brunch-diary / Dockerfile
openfree's picture
feat: Dockerfile
11ccb24 verified
Raw
History Blame Contribute Delete
410 Bytes
FROM python:3.11-slim
WORKDIR /app
RUN apt-get update && apt-get install -y --no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
# HF Space는 non-root user 필요
RUN useradd -m -u 1000 user
USER user
EXPOSE 7860
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860", "--timeout-keep-alive", "120"]