# Use official PyTorch image (CPU+CUDA ready) FROM pytorch/pytorch:2.1.0-cuda11.8-cudnn8-runtime # Set working directory WORKDIR /app # Avoid Python buffering issues ENV PYTHONUNBUFFERED=1 ENV HF_HOME=/app/huggingface ENV HF_HUB_OFFLINE=0 # Install system dependencies RUN apt-get update && apt-get install -y git curl wget && rm -rf /var/lib/apt/lists/* # Install Python packages COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy app COPY . . # Expose Streamlit port EXPOSE 8501 # Command to run Streamlit CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]