|
|
|
FROM nvidia/cuda:12.1.1-runtime-ubuntu22.04 |
|
|
|
|
|
RUN apt-get update && apt-get install -y \ |
|
python3 python3-pip git gcc g++ make \ |
|
&& apt-get clean |
|
|
|
|
|
WORKDIR /app |
|
|
|
|
|
RUN mkdir -p /app/.cache /tmp/.triton /tmp/torchinductor_cache && chmod -R 777 /app/.cache /tmp/.triton /tmp/torchinductor_cache |
|
|
|
|
|
ENV HF_HOME=/app/.cache \ |
|
HF_HUB_CACHE=/app/.cache \ |
|
TRITON_CACHE_DIR=/tmp/.triton \ |
|
TORCHINDUCTOR_CACHE_DIR=/tmp/torchinductor_cache \ |
|
BITSANDBYTES_NOWELCOME=1 |
|
|
|
|
|
COPY requirements.txt . |
|
RUN pip install --upgrade pip && pip install -r requirements.txt |
|
|
|
|
|
COPY . . |
|
|
|
|
|
CMD ["python3", "app.py"] |
|
|