ticket-support-env / Dockerfile
khushiii02's picture
Update Dockerfile
bcdc8b7 verified
Raw
History Blame Contribute Delete
1.17 kB
FROM python:3.11-slim
WORKDIR /app
RUN apt-get update && apt-get install -y --no-install-recommends curl \
&& rm -rf /var/lib/apt/lists/*
# Install uv (small, fast binary — needed for `uv run server`)
RUN pip install uv --no-cache-dir --quiet
# Install main application deps
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Install openenv-core WITHOUT its heavy deps (gradio etc.)
# openenv validate checks pyproject.toml, not whether gradio is installed
RUN pip install --no-cache-dir --no-deps "openenv-core==0.2.3" || \
pip install --no-cache-dir --no-deps "openenv-core" || true
# Copy all project files
COPY . .
# Required env vars per hackathon spec
ENV API_BASE_URL="https://router.huggingface.co/v1"
ENV MODEL_NAME="Qwen/Qwen2.5-72B-Instruct"
ENV HF_TOKEN=""
ENV HF_HOME=/app/.cache/huggingface
RUN mkdir -p /app/.cache/huggingface
EXPOSE 7860
# Short start-period — use_fallback_only=True means env loads in <2s
HEALTHCHECK --interval=15s --timeout=10s --start-period=30s \
CMD curl -f http://localhost:7860/health || exit 1
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1"]