FROM python:3.10 WORKDIR /antibody-database # Create cache directories with full permissions RUN mkdir -p /.cache/huggingface && \ chmod -R 777 /.cache # Copy requirements first for better caching COPY requirements.txt . # Install dependencies with upgrade flag RUN pip install --no-cache-dir --upgrade pip && \ pip install --no-cache-dir --upgrade -r requirements.txt # Copy application files COPY . . # Expose Gradio port EXPOSE 7860 # Set environment variables ENV GRADIO_SERVER_NAME="0.0.0.0" ENV GRADIO_SERVER_PORT=7860 # Run the application CMD ["gradio", "app.py"]