Spaces:
Sleeping
Sleeping
File size: 648 Bytes
070500c 394be1a 070500c 394be1a 070500c 394be1a 070500c 394be1a 070500c 394be1a 070500c 394be1a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | 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"] |