mirror of
https://github.com/ghndrx/kubeflow-pipelines.git
synced 2026-02-10 06:45:13 +00:00
- Force reinstall torch 2.4.0 in Dockerfile - Pin transformers==4.47.1 (known working with bitsandbytes) - Fix set_submodule AttributeError
24 lines
675 B
Docker
24 lines
675 B
Docker
FROM runpod/pytorch:2.4.0-py3.11-cuda12.4.1-devel-ubuntu22.04
|
|
|
|
WORKDIR /app
|
|
|
|
# Copy requirements first for better caching
|
|
COPY requirements.txt /app/requirements.txt
|
|
|
|
# Upgrade pip and install dependencies
|
|
# Force upgrade torch to ensure compatibility with transformers
|
|
RUN pip install --upgrade pip && \
|
|
pip install --no-cache-dir torch==2.4.0 --force-reinstall && \
|
|
pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Copy handler and data
|
|
COPY handler.py /app/handler.py
|
|
COPY data/ /app/data/
|
|
|
|
# Set environment variables
|
|
ENV PYTHONUNBUFFERED=1
|
|
ENV HF_HOME=/tmp/huggingface
|
|
ENV DDI_DATA_PATH=/app/data/drugbank_ddi_complete.jsonl
|
|
|
|
CMD ["python", "-u", "handler.py"]
|