File size: 687 Bytes
ee91164
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
FROM python:3.11-slim

WORKDIR /app
ENV PYTHONDONTWRITEBYTECODE=1 \
    PYTHONUNBUFFERED=1

# Copy only the files needed to serve the packaged environment.
COPY pyproject.toml README.md openenv.yaml ./
COPY reasonbudget_gym ./reasonbudget_gym

# The Space serves the bundled cached environment, so it only needs the
# lightweight runtime deps plus an editable install of this package.
RUN pip install --no-cache-dir \
    "fastapi>=0.110.0" \
    "uvicorn[standard]>=0.29.0" \
    "pydantic>=2.0" \
    "numpy>=1.24" \
    "hatchling" \
 && pip install --no-cache-dir --no-deps -e .

EXPOSE 8000

CMD ["uvicorn", "reasonbudget_gym.server.app:app", "--host", "0.0.0.0", "--port", "8000"]