Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files12345678910111213141516171819202122# Use the official lightweight Python imageFROM python:3.10-slim# Set working directoryWORKDIR /app# Copy source filesCOPY ./src /app/srcCOPY requirements.txt .# Create a writable cache directory for transformersRUN mkdir -p /app/cache# Install dependenciesRUN pip install --no-cache-dir -r requirements.txt# Set environment variablesENV TRANSFORMERS_CACHE=/app/cacheENV STREAMLIT_SERVER_HEADLESS=true# Run the app using StreamlitCMD ["streamlit", "run", "src/streamlit_app.py", "--server.port=7860", "--server.address=0.0.0.0"]123456789101112131415161718192021FROM python:3.10-slimWORKDIR /app# Copy filesCOPY ./src /app/srcCOPY requirements.txt .# Create a safe cache directoryRUN mkdir -p /app/cache# Install dependenciesRUN pip install --no-cache-dir -r requirements.txt# Set environment variables for safe cachingENV HF_HOME=/app/cacheENV TRANSFORMERS_CACHE=/app/cacheENV STREAMLIT_SERVER_HEADLESS=true# Run the appCMD ["streamlit", "run", "src/streamlit_app.py", "--server.port=7860", "--server.address=0.0.0.0"]
Dockerfile+5-6