Download Dockerfile from pyrowoon/Tea_room: direct link, hf CLI and curl.
- Browser
- Download file 961 Bytes
-
https://huggingface.co/spaces/pyrowoon/Tea_room/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/pyrowoon/Tea_room/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/pyrowoon/Tea_room/resolve/main/Dockerfile
961 Bytes
| FROM python:3.10-slim | |
| # Рекомендуемый пользователем UID 1000 для Spaces | |
| RUN useradd -m -u 1000 user | |
| WORKDIR /app | |
| # Устанавливаем зависимости | |
| COPY --chown=user teapot/requirements.txt ./requirements.txt | |
| RUN pip install --no-cache-dir --upgrade -r requirements.txt | |
| # Копируем backend и frontend в ожидаемую структурой layout | |
| COPY --chown=user teapot/backend /app/backend | |
| COPY --chown=user teapot/frontend /app/frontend | |
| # Каталог для SQLite-базы (app.py ожидает 'data/teapot.db') | |
| RUN mkdir -p /app/data && chown -R user:user /app/data | |
| USER user | |
| # Hugging Face по умолчанию пробрасывает порт 7860, но позволяем переопределять через PORT | |
| ENV PORT=7860 | |
| EXPOSE 7860 | |
| # Точка входа FastAPI-приложения | |
| CMD ["sh", "-c", "uvicorn backend.app:app --host 0.0.0.0 --port ${PORT:-7860}"] | |