Spaces:
Sleeping

arkanum / Dockerfile
benny4982's picture
Claude Opus 4.6
Auto-set version from git commit hash on each deploy
3e2ead7
Raw History Blame
739 Bytes
FROM python:3.11-slim
WORKDIR /app
# System-Dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential git \
&& rm -rf /var/lib/apt/lists/*
# Python-Dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt gunicorn
# App-Code kopieren
COPY . .
# Speichere Git-Commit-Hash als Version (falls .git vorhanden)
RUN if [ -d .git ]; then git rev-parse --short HEAD > VERSION; else echo "dev" > VERSION; fi
# PYTHONPATH setzen
ENV PYTHONPATH=/app
# HF Spaces erwartet Port 7860
EXPOSE 7860
CMD ["gunicorn", "--worker-class", "uvicorn.workers.UvicornWorker", "--bind", "0.0.0.0:7860", "--workers", "1", "--timeout", "600", "--access-logfile", "-", "src.api:app"]