Spaces:
Running
Running
File size: 904 Bytes
7fbb148 c3e014a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | # 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"]
|