Spaces:
Running
Running
| # Use official Python slim base image | |
| FROM python:3.10-slim | |
| # Set working directory | |
| WORKDIR /app | |
| # Prevent Python from writing pyc files and buffering stdout/stderr | |
| ENV PYTHONDONTWRITEBYTECODE=1 | |
| ENV PYTHONUNBUFFERED=1 | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| build-essential \ | |
| git \ | |
| && rm -rf /lib/apt/lists/* | |
| # Install python dependencies | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy application source code | |
| COPY gemma_code_llm/ ./gemma_code_llm/ | |
| COPY static/ ./static/ | |
| # Expose port | |
| EXPOSE 7860 | |
| # Default environment variables | |
| ENV BASE_MODEL="google/gemma-3-1b-it" | |
| ENV ADAPTER_PATH="/app/outputs/gemma-code-lora" | |
| ENV QUANTIZATION="none" | |
| ENV DTYPE="auto" | |
| ENV TRUST_REMOTE_CODE="0" | |
| # Start FastAPI application | |
| CMD ["uvicorn", "gemma_code_llm.api:app", "--host", "0.0.0.0", "--port", "7860"] | |