solarfit-api / Dockerfile
limtaek's picture
perf: MAX_BASE_TILES=4 + 50s time budget to prevent timeout
ea3bc7f verified
Raw
History Blame Contribute Delete
509 Bytes
FROM python:3.11-slim
WORKDIR /app
# μ‹œμŠ€ν…œ μ˜μ‘΄μ„±
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc g++ libgdal-dev libgeos-dev libproj-dev \
&& rm -rf /var/lib/apt/lists/*
# Python μ˜μ‘΄μ„±
COPY api/requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# μ•± μ½”λ“œ
COPY api/ ./api/
# HF Space: limit tiles for CPU inference speed
ENV MAX_BASE_TILES=4
ENV PORT=7860
EXPOSE 7860
CMD ["uvicorn", "api.main:app", "--host", "0.0.0.0", "--port", "7860"]