Skip to content

Commit

Permalink
build(docker): fix docker lints
Browse files Browse the repository at this point in the history
  • Loading branch information
winstxnhdw committed Jul 26, 2024
1 parent 81f40bf commit afcd543
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 29 deletions.
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM ghcr.io/winstxnhdw/nllb-api:main

ENV APP_PORT 7860
ENV OMP_NUM_THREADS 1
ENV CT2_USE_EXPERIMENTAL_PACKED_GEMM 1
ENV CT2_FORCE_CPU_ISA AVX512
ENV WORKER_COUNT 2
ENV APP_PORT=7860
ENV OMP_NUM_THREADS=1
ENV CT2_USE_EXPERIMENTAL_PACKED_GEMM=1
ENV CT2_FORCE_CPU_ISA=AVX512
ENV WORKER_COUNT=2

EXPOSE $APP_PORT
22 changes: 11 additions & 11 deletions Dockerfile.build
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ ARG TRANSLATOR_MODEL_NAME='winstxnhdw/nllb-200-distilled-1.3B-ct2-int8'
ARG LANGUAGE_DETECTOR_MODEL_NAME='facebook/fasttext-language-identification'


FROM python:slim as python-builder
FROM python:slim AS python-builder

ENV POETRY_VIRTUALENVS_CREATE false
ENV POETRY_HOME /opt/poetry
ENV PATH $POETRY_HOME/bin:$PATH
ENV POETRY_VIRTUALENVS_CREATE=false
ENV POETRY_HOME=/opt/poetry
ENV PATH=$POETRY_HOME/bin:$PATH

COPY pyproject.toml poetry.lock ./

Expand All @@ -15,7 +15,7 @@ RUN $POETRY_HOME/bin/pip install poetry
RUN poetry install --without=dev,cuda


FROM python:slim as model-builder
FROM python:slim AS model-builder

ARG TRANSLATOR_MODEL_NAME
ARG LANGUAGE_DETECTOR_MODEL_NAME
Expand All @@ -27,7 +27,7 @@ RUN python -c \
hf_hub_download('$LANGUAGE_DETECTOR_MODEL_NAME', 'model.bin')"


FROM caddy:builder-alpine as caddy-builder
FROM caddy:builder-alpine AS caddy-builder

RUN xcaddy build master --with github.com/caddyserver/cache-handler

Expand All @@ -36,11 +36,11 @@ FROM python:slim

ARG TRANSLATOR_MODEL_NAME
ARG LANGUAGE_DETECTOR_MODEL_NAME
ENV HOME /home/user
ENV PYTHONUNBUFFERED 1
ENV PYTHONDONTWRITEBYTECODE 1
ENV SERVER_PORT 5000
ENV CACHE_TIMEOUT 20s
ENV HOME=/home/user
ENV PYTHONUNBUFFERED=1
ENV PYTHONDONTWRITEBYTECODE=1
ENV SERVER_PORT=5000
ENV CACHE_TIMEOUT=20s

RUN useradd -m -u 1000 user

Expand Down
26 changes: 13 additions & 13 deletions Dockerfile.cuda-build
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ ARG TRANSLATOR_MODEL_NAME='winstxnhdw/nllb-200-distilled-1.3B-ct2-int8'
ARG LANGUAGE_DETECTOR_MODEL_NAME='facebook/fasttext-language-identification'


FROM python:slim as python-builder
FROM python:slim AS python-builder

ENV POETRY_VIRTUALENVS_CREATE false
ENV POETRY_HOME /opt/poetry
ENV PATH $POETRY_HOME/bin:$PATH
ENV POETRY_VIRTUALENVS_CREATE=false
ENV POETRY_HOME=/opt/poetry
ENV PATH=$POETRY_HOME/bin:$PATH

COPY pyproject.toml poetry.lock ./

Expand All @@ -15,7 +15,7 @@ RUN $POETRY_HOME/bin/pip install poetry
RUN poetry install --without=dev


FROM python:slim as model-builder
FROM python:slim AS model-builder

ARG TRANSLATOR_MODEL_NAME
ARG LANGUAGE_DETECTOR_MODEL_NAME
Expand All @@ -27,7 +27,7 @@ RUN python -c \
hf_hub_download('$LANGUAGE_DETECTOR_MODEL_NAME', 'model.bin')"


FROM caddy:2.8.4-builder-alpine as caddy-builder
FROM caddy:2.8.4-builder-alpine AS caddy-builder

RUN xcaddy build master --with github.com/caddyserver/cache-handler

Expand All @@ -36,13 +36,13 @@ FROM python:slim

ARG TRANSLATOR_MODEL_NAME
ARG LANGUAGE_DETECTOR_MODEL_NAME
ENV HOME /home/user
ENV PYTHONUNBUFFERED 1
ENV PYTHONDONTWRITEBYTECODE 1
ENV SERVER_PORT 5000
ENV CACHE_TIMEOUT 20s
ENV USE_CUDA True
ENV LD_LIBRARY_PATH /usr/local/lib/python3.12/site-packages/nvidia/cublas/lib
ENV HOME=/home/user
ENV PYTHONUNBUFFERED=1
ENV PYTHONDONTWRITEBYTECODE=1
ENV SERVER_PORT=5000
ENV CACHE_TIMEOUT=20s
ENV USE_CUDA=True
ENV LD_LIBRARY_PATH=/usr/local/lib/python3.12/site-packages/nvidia/cublas/lib

RUN useradd -m -u 1000 user

Expand Down

0 comments on commit afcd543

Please sign in to comment.