Spaces:
Sleeping
Sleeping
File size: 1,025 Bytes
e7729e5 549635a e7729e5 fb49915 e7729e5 fb49915 60b1d53 9b12a80 9d5d2ab fb49915 e7729e5 4a4dc2f 06261f2 | 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 OpenEnv sources)
# - Standalone environments (with openenv from PyPI/Git)
# The build script (openenv build) handles context detection and sets appropriate build args.
FROM python:3.10
WORKDIR /app
COPY . .
COPY openenv.yaml /app/server/openenv.yaml
COPY openenv.yaml /app/openenv.yaml
RUN pip install --no-cache-dir openenv-core
RUN pip install --no-cache-dir -r server/requirements.txt
ENV PYTHONPATH="/app:/app/my_env:$PYTHONPATH"
# Install openenv-core explicitly
RUN /app/.venv/bin/pip install openenv-core || \
/app/.venv/bin/python -m pip install openenv-core || \
pip install openenv-core
CMD ["sh", "-c", "cd /app && uvicorn server.app:app --host 0.0.0.0 --port 7860"]
|