visionquery / Dockerfile
Saptadip Saha
Fix Dockerfile
394be1a
raw
history blame contribute delete
648 Bytes
FROM python:3.11-slim
RUN apt-get update && apt-get install -y \
git libglib2.0-0 libsm6 libxext6 libxrender-dev libgomp1 \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# ← KEY FIX: download Taipy GUI bundle NOW (build has network, runtime doesn't)
RUN python -c "from taipy.gui import Gui; print('Taipy assets cached')"
COPY . .
RUN useradd -m -u 1000 user && chown -R user:user /app
# ← KEY FIX: redirect HF model cache to writable /tmp
ENV HF_HOME=/tmp/huggingface
ENV TRANSFORMERS_CACHE=/tmp/huggingface
USER user
EXPOSE 7860
CMD ["python", "app.py"]