CoolFace
Apppublic

triflix/diffusionLLM

sourceHugging Faceupdated 7mo agoView on Hugging Face
0likes
Dockerfile42 linesDownload Raw Back to root
1FROM python:3.11-slim-bookworm2 3# System deps4RUN apt-get update && \5    apt-get install -y --no-install-recommends curl && \6    rm -rf /var/lib/apt/lists/*7 8# Non-root user (HF Spaces requirement)9RUN useradd -m -u 1000 user10 11# Install PyTorch CPU-only12RUN pip install --no-cache-dir \13    torch --index-url https://download.pytorch.org/whl/cpu14 15# Install Python deps16COPY requirements.txt /tmp/requirements.txt17RUN pip install --no-cache-dir -r /tmp/requirements.txt && \18    rm /tmp/requirements.txt19 20# Copy app21COPY app.py /app/app.py22 23# Ownership24RUN chown -R user:user /app25 26# Switch to non-root27USER user28 29# Env30ENV HOME=/home/user31ENV HF_HOME=/home/user/.cache/huggingface32ENV TRANSFORMERS_CACHE=/home/user/.cache/huggingface33ENV OMP_NUM_THREADS=234ENV MKL_NUM_THREADS=235ENV TOKENIZERS_PARALLELISM=false36ENV QUANTIZE=true37ENV PORT=786038 39WORKDIR /app40EXPOSE 786041 42CMD ["python", "app.py"]