Skip to content

Commit

Permalink
upgrade dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
ef0xa committed Feb 10, 2025
1 parent b84e072 commit ad3b088
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,22 @@
ARG WORKER_CUDA_VERSION=12.1.0
FROM runpod/base:0.6.2-cuda${WORKER_CUDA_VERSION}

RUN apt-get update && apt-get dist-upgrade -y
#Reinitialize, as its lost after the FROM command
# &efron: this doesn't quite follow to me.
ARG WORKER_CUDA_VERSION=12.1.0

# Python dependencies.

RUN --mount-type=cache,target=/root/.cache/pip python3.11 -m pip install --upgrade pip
RUN --mount=type=cache,target=/root/.cache/pip python3.11 -m pip install --upgrade pip

# we're always going to do this. important to do this FIRST - it can take >2m and we want to cache the result as early as possible.
# TODO: pin this to a specific version

RUN --mount-type=cache,target=/root/.cache/pip python3.11 -m pip install torch torchvision torchaudio
RUN --mount=type=cache,target=/root/.cache/pip python3.11 -m pip install torch torchvision torchaudio

# ourother requirements may change; updating the version of infinity embedding, for instance.
COPY builder/requirements.txt /requirements.txt
RUN --mount-type=cache,target=/root/.cache/pip python3.11 -m pip install -r /requirements.txt
RUN --mount=type=cache,target=/root/.cache/pip python3.11 -m pip install -r /requirements.txt
COPY ./src /src
CMD python3.11 -u /src/handler.py

0 comments on commit ad3b088

Please sign in to comment.