Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files11234565678978911121011121314141516171819201621222324252627281829303120323334353637# Base imageFROM python:3.13.5-slimFROM python:3.11
# Set working directoryWORKDIR /app
RUN apt-get update && apt-get install -y \ build-essential \ curl \ git \ && rm -rf /var/lib/apt/lists/*# Copy requirementsCOPY ./requirements.txt /app/requirements.txt
COPY requirements.txt ./COPY src/ ./src/# 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
RUN pip3 install -r requirements.txt# Create a non-root userRUN useradd -m -u 1000 userUSER userENV HOME /home/userENV PATH $HOME/.local/bin:$PATH
EXPOSE 8501# Optional cache directories for HF modelsENV HF_HOME $HOME/.cache/huggingfaceRUN mkdir -p $HF_HOME
# Set working directory for appWORKDIR $HOME/appCOPY . $HOME/app
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health# Expose Streamlit default portEXPOSE 8501
ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]# Command to run Streamlit appCMD streamlit run app.py \ --server.headless true \ --server.enableCORS false \ --server.enableXsrfProtection false \ --server.fileWatcherType noneDockerfile+29-12