Spaces:
Sleeping
Sleeping
File size: 689 Bytes
83874aa a508c5b 83874aa a508c5b 83874aa a508c5b 83874aa a508c5b 68be742 e1177f7 68be742 31ed0b3 a508c5b e1177f7 |
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 26 27 28 29 30 |
# Use an official lightweight Python image
FROM python:3.13-slim
# Set working directory inside the container
WORKDIR /app
# Copy requirements first to leverage Docker layer caching
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application code
COPY *.py .
ENV PYTHONUNBUFFERED=1 \
PORT=8501 \
HF_HOME=/home/user/huggingface
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
WORKDIR $HOME/app
COPY --chown=user . $HOME/app
EXPOSE 8501
ENTRYPOINT ["streamlit", "run", "streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0", "--server.enableXsrfProtection=false"]
|