diff --git a/.dockerignore b/.dockerignore index c2eabec..027756e 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,2 +1,5 @@ .venv -.env \ No newline at end of file +.env +.git +.github +Dockerfile diff --git a/Dockerfile b/Dockerfile index ac5864d..5275115 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,11 @@ -FROM python:3.11-slim-bookworm as base +FROM python:3.11-slim-bookworm AS base # Use args ARG USE_CUDA ARG USE_CUDA_VER -## Basis ## -ENV ENV=prod \ - PORT=9099 \ - # pass build args to the build - USE_CUDA_DOCKER=${USE_CUDA} \ +# Pass build args to the build +ENV USE_CUDA_DOCKER=${USE_CUDA} \ USE_CUDA_DOCKER_VER=${USE_CUDA_VER} @@ -30,11 +27,17 @@ RUN pip3 install uv && \ fi RUN uv pip install --system -r requirements.txt --no-cache-dir -# Copy the application code +FROM python:3.11-slim-bookworm AS final +# Copy installed dependencies +COPY --from=base /usr/local/lib/python3.11/site-packages /usr/local/lib/python3.11/site-packages +COPY --from=base /usr/local/include /usr/local/include +COPY --from=base /usr/local/bin /usr/local/bin COPY . . # Expose the port ENV HOST="0.0.0.0" ENV PORT="9099" +ENV ENV=prod +ENV PORT=9099 -ENTRYPOINT [ "bash", "start.sh" ] \ No newline at end of file +ENTRYPOINT [ "bash", "start.sh" ]