Testing01 / Dockerfile
D-Jaden02's picture
Create Dockerfile
f96c3fd verified
raw
history blame contribute delete
408 Bytes
FROM python:3.10-slim
# HF Spaces requires user 1000
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH \
PYTHONUNBUFFERED=1
WORKDIR $HOME/app
COPY --chown=user requirements.txt .
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
COPY --chown=user app.py .
EXPOSE 7860
CMD ["python", "app.py"]