repro-papers / Dockerfile
EmmaScharfmann's picture
EmmaScharfmann HF Staff
add dockerfile
ca60ce9
Raw
History Blame Contribute Delete
668 Bytes
# HF Spaces docker runtime: builds this image and runs the container,
# expecting it to serve on the port declared as `app_port` in README.md.
FROM python:3.13-slim
WORKDIR /app
COPY requirements.txt requirements.txt
RUN pip install --no-cache-dir --upgrade -r requirements.txt
COPY . .
# Spaces containers run as a non-root user by convention; match that so
# huggingface_hub's cache writes (under $HOME/.cache) don't hit permission
# errors.
RUN useradd -m -u 1000 user
ENV HOME=/home/user
RUN chown -R user:user /app "$HOME"
USER user
ENV GRADIO_SERVER_NAME=0.0.0.0 \
GRADIO_SERVER_PORT=7860 \
PYTHONUNBUFFERED=1
EXPOSE 7860
CMD ["python", "app.py"]