Qwen2-VL-2B / Dockerfile
SaudF's picture
Update Dockerfile
ee149cc verified
raw
history blame contribute delete
670 Bytes
FROM python:3.10-slim
WORKDIR /app
# System deps (PIL/ffmpeg helpful for images)
RUN apt-get update && apt-get install -y git ffmpeg libsm6 libxext6 && rm -rf /var/lib/apt/lists/*
# >>> Use /data for caches (writable volume on Spaces)
ENV XDG_CACHE_HOME=/data/.cache \
HF_HOME=/data/.cache/huggingface \
TRANSFORMERS_CACHE=/data/.cache/huggingface/hub \
HF_HUB_ENABLE_HF_TRANSFER=1
# Create cache dirs and make them writable
RUN mkdir -p /data/.cache/huggingface/hub && chmod -R 777 /data
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
EXPOSE 7860
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]