reco-streamlit-docker / Dockerfile
rkonan's picture
correction
243e291
raw
history blame contribute delete
697 Bytes
FROM python:3.10-slim
RUN apt-get update && apt-get install -y \
libgl1-mesa-glx \
libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
RUN useradd -m -u 1000 user
ENV HOME=/home/user
ENV PATH=/home/user/.local/bin:$PATH
WORKDIR $HOME/app
COPY --chown=user:user . .
USER user
RUN pip install --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt
ENV ENV=space
EXPOSE 7860
# Configuration critique pour HF Spaces
CMD ["streamlit", "run", "app/main.py", \
"--server.port=7860", \
"--server.address=0.0.0.0", \
"--server.headless=true", \
"--server.enableCORS=false", \
"--server.enableXsrfProtection=false", \
"--server.fileWatcherType=none"]