Add runpod sls handler

This commit is contained in:
zeke
2025-04-14 18:30:14 -08:00
committed by Wing Lian
parent f9c7c3bb72
commit c2fc35f520
12 changed files with 1598 additions and 0 deletions

18
.runpod/Dockerfile Normal file
View File

@@ -0,0 +1,18 @@
FROM runpod/pytorch:3.10-2.0.0-117
COPY .runpod/requirements.txt /requirements.txt
RUN --mount=type=cache,target=/root/.cache/pip \
python3 -m pip install --upgrade pip && \
python3 -m pip install --upgrade -r /requirements.txt
# Environment settings
ARG BASE_VOLUME="/runpod-volume"
ENV BASE_VOLUME=$BASE_VOLUME
ENV HF_DATASETS_CACHE="${BASE_VOLUME}/huggingface-cache/datasets"
ENV HUGGINGFACE_HUB_CACHE="${BASE_VOLUME}/huggingface-cache/hub"
ENV TRANSFORMERS_CACHE="${BASE_VOLUME}/huggingface-cache/hub"
COPY .runpod/src /src
CMD ["python3", "/src/handler.py"]