|
|
|
FROM python:3.10-slim |
|
|
|
|
|
RUN apt-get update && apt-get install -y gcc g++ make |
|
|
|
|
|
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_DATASETS_CACHE=/app/.cache \ |
|
HF_HUB_CACHE=/app/.cache \ |
|
TRITON_CACHE_DIR=/tmp/.triton \ |
|
TORCHINDUCTOR_CACHE_DIR=/tmp/torchinductor_cache |
|
|
|
|
|
COPY requirements.txt . |
|
RUN pip install --no-cache-dir -r requirements.txt |
|
|
|
|
|
RUN pip install --no-cache-dir triton bitsandbytes |
|
|
|
|
|
COPY app.py . |
|
|
|
|
|
CMD ["python", "app.py"] |
|
|