@@ -492,26 +492,10 @@ WORKDIR /app
492492RUN --mount=type=cache,target=/root/.cache/uv \
493493 --mount=type=bind,source=uv.lock,target=uv.lock \
494494 --mount=type=bind,source=pyproject.toml,target=pyproject.toml \
495- uv sync --frozen -- no-install-project --extras ml --no-dev --no-python-downloads
495+ uv sync --frozen -v -- no-install-project --extra ml --no-dev --no-python-downloads
496496COPY . /app
497497RUN --mount=type=cache,target=/root/.cache/uv \
498- uv sync --frozen --no-dev --extras ml --no-python-downloads
499-
500- # Then, use a final image without uv
501- FROM python:3.11-slim-bookworm
502-
503- ARG HANDLER
504- ENV HANDLER=${HANDLER} PYTHONPATH=.
505-
506- # Copy the application from the builder
507- COPY --from=builder --chown=app:app /app /app
508- WORKDIR /app
509-
510- # Place executables in the environment at the front of the path
511- ENV PATH="/app/.venv/bin:$PATH"
512-
513- # Run the service using the path to the handler
514- ENTRYPOINT /app/.venv/bin/python -u $HANDLER
498+ uv sync --frozen -v --no-dev --extra ml --no-python-downloads
515499
516500# Torch dockerfile
517501# Used for torch runtime based nitric batch services
@@ -527,14 +511,11 @@ ENV NVIDIA_DRIVER_CAPABILITIES=all
527511ENV NVIDIA_REQUIRE_CUDA="cuda>=8.0"
528512
529513RUN apt-get update -y && \
530- apt-get install -y ca-certificates curl git python3.11 && \
531- update-ca-certificates && \
532- curl https://bootstrap.pypa.io/get-pip.py | python3.11 && \
533- ln -sf /usr/bin/python3.11 /usr/local/bin/python && \
534- ln -sf /usr/bin/python3.11 /usr/bin/python3 && \
535- ln -sf /usr/bin/python3.11 /usr/bin/python && \
536- ln -sf /usr/bin/pip3.11 /usr/bin/pip3 && \
537- ln -sf /usr/bin/pip3.11 /usr/bin/pip
514+ apt-get install -y software-properties-common && \
515+ add-apt-repository ppa:deadsnakes/ppa && \
516+ apt-get update -y && \
517+ apt-get install -y python3.11 && \
518+ ln -sf /usr/bin/python3.11 /usr/local/bin/python3.11
538519
539520# Copy the application from the builder
540521COPY --from=builder --chown=app:app /app /app
0 commit comments