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"]