generated from runpod-workers/worker-template
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
15 additions
and
87 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,23 @@ | ||
ARG WORKER_CUDA_VERSION=12.1.0 | ||
# ATTENTION: is this still the right CUDA version? | ||
ARG WORKER_CUDA_VERSION=12.1.0 | ||
FROM runpod/base:0.6.2-cuda${WORKER_CUDA_VERSION} | ||
|
||
#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 | ||
COPY builder/requirements.txt /requirements.txt | ||
RUN python3.11 -m pip install --upgrade pip && \ | ||
python3.11 -m pip install -r /requirements.txt --no-cache-dir && \ | ||
rm /requirements.txt | ||
# Python dependencies. | ||
|
||
RUN pip uninstall torch -y && \ | ||
CUDA_VERSION_SHORT=$(echo ${WORKER_CUDA_VERSION} | cut -d. -f1,2 | tr -d .) && \ | ||
pip install --pre torch==2.4.0.dev20240518+cu${CUDA_VERSION_SHORT} --index-url https://download.pytorch.org/whl/nightly/cu${CUDA_VERSION_SHORT} --no-cache-dir | ||
|
||
ENV HF_HOME=/runpod-volume | ||
|
||
# Add src files (Worker Template) | ||
ADD src . | ||
RUN --mount-type=cache,target=/root/.cache/pip python3.11 -m pip install --upgrade pip | ||
|
||
CMD python3.11 -u /handler.py | ||
# 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 | ||
|
||
# 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/pippython3.11 -m pip install -r /requirements.txt | ||
COPY ./src /src | ||
CMD python3.11 -u /src/handler.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
runpod~=1.7.0 | ||
runpod>=1.7.7 | ||
infinity-emb[all,onnxruntime-gpu]==0.0.75 | ||
einops # deployment of custom code with nomic |