Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files1234567891011121314151617181920FROM python:3.13.5-slimWORKDIR /appRUN apt-get update && apt-get install -y \build-essential \curl \git \&& rm -rf /var/lib/apt/lists/*COPY requirements.txt ./COPY src/ ./src/RUN pip3 install -r requirements.txtEXPOSE 8501HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/healthENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]12345678910111213141516171819202122232425262728293031323334353637# Base imageFROM python:3.11# Set working directoryWORKDIR /app# Copy requirementsCOPY ./requirements.txt /app/requirements.txt# Upgrade pip and install dependenciesRUN pip3 install --no-cache-dir --upgrade pipRUN pip3 install --no-cache-dir wheel setuptools buildRUN pip3 install --no-cache-dir --use-pep517 -r /app/requirements.txt# Create a non-root userRUN useradd -m -u 1000 userUSER userENV HOME /home/userENV PATH $HOME/.local/bin:$PATH# Optional cache directories for HF modelsENV HF_HOME $HOME/.cache/huggingfaceRUN mkdir -p $HF_HOME# Set working directory for appWORKDIR $HOME/appCOPY . $HOME/app# Expose Streamlit default portEXPOSE 8501# Command to run Streamlit appCMD streamlit run app.py \--server.headless true \--server.enableCORS false \--server.enableXsrfProtection false \--server.fileWatcherType none
Dockerfile+29-12