File size: 824 Bytes
6d7f6e0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# 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"]