Spaces:
Paused
Paused
| # Copyright (c) Meta Platforms, Inc. and affiliates. | |
| # All rights reserved. | |
| # | |
| # This source code is licensed under the BSD-style license found in the | |
| # LICENSE file in the root directory of this source tree. | |
| # Multi-stage build using openenv-base | |
| # This Dockerfile is flexible and works for both: | |
| # - In-repo environments (with local src/core) | |
| # - Standalone environments (with openenv-core from pip) | |
| # The build script (openenv build) handles context detection and sets appropriate build args. | |
| FROM python:3.11-slim | |
| WORKDIR /app | |
| # Install uv | |
| RUN pip install uv | |
| # Copy everything | |
| COPY . . | |
| # Install openenv-core and fastapi/uvicorn | |
| RUN pip install openenv-core fastapi uvicorn | |
| # HF Spaces requires port 7860 | |
| EXPOSE 7860 | |
| ENV PYTHONPATH="/app" | |
| CMD ["uvicorn", "server.app:app", "--host", "0.0.0.0", "--port", "7860"] | |