gohan-api-light / Dockerfile
tabito12345678910
Fix Dockerfile: add git dependency and use pre-built rtdl wheel
061add3
raw
history blame
585 Bytes
FROM python:3.11-slim
WORKDIR /app
# Install system dependencies including git for rtdl installation
RUN apt-get update && apt-get install -y \
gcc \
g++ \
git \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements first for better caching
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY . .
# Expose port
EXPOSE 7860
# Health check
HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 \
CMD curl -f http://localhost:7860/status || exit 1
# Run the application
CMD ["python", "app.py"]