arya89 commited on
Commit
f32f258
·
verified ·
1 Parent(s): 5381665

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. pyproject.toml +5 -6
  2. server/Dockerfile +7 -47
pyproject.toml CHANGED
@@ -9,7 +9,7 @@ requires = ["setuptools>=61.0", "wheel"]
9
  build-backend = "setuptools.build_meta"
10
 
11
  [project]
12
- name = "MY_ENV"
13
  version = "0.1.0"
14
  description = "OpenOps Production Incident Management Environment for OpenEnv"
15
  authors = [{name = "arya89"}]
@@ -31,9 +31,8 @@ dev = [
31
  [project.scripts]
32
  server = "server.app:main"
33
 
34
- [tool.setuptools]
35
- include-package-data = true
36
- packages = ["server", "models", "graders"]
37
-
38
  [tool.uv]
39
- dev-dependencies = []
 
 
 
 
9
  build-backend = "setuptools.build_meta"
10
 
11
  [project]
12
+ name = "openenv-openops"
13
  version = "0.1.0"
14
  description = "OpenOps Production Incident Management Environment for OpenEnv"
15
  authors = [{name = "arya89"}]
 
31
  [project.scripts]
32
  server = "server.app:main"
33
 
 
 
 
 
34
  [tool.uv]
35
+ package = false
36
+
37
+ [tool.setuptools]
38
+ py-modules = []
server/Dockerfile CHANGED
@@ -11,61 +11,21 @@
11
  # The build script (openenv build) handles context detection and sets appropriate build args.
12
 
13
  # Use OpenEnv base image
14
- FROM ghcr.io/meta-pytorch/openenv-base:latest AS builder
15
-
16
- WORKDIR /app
17
-
18
- # Install system dependencies
19
- RUN apt-get update && \
20
- apt-get install -y --no-install-recommends \
21
- curl \
22
- ca-certificates && \
23
- rm -rf /var/lib/apt/lists/*
24
-
25
- # Copy entire environment
26
- COPY . /app/env
27
 
28
  WORKDIR /app/env
29
 
30
- # Install uv if not present
31
- RUN if ! command -v uv >/dev/null 2>&1; then \
32
- curl -LsSf https://astral.sh/uv/install.sh | sh; \
33
- fi
34
-
35
- ENV PATH="/root/.cargo/bin:$PATH"
36
-
37
- # Sync dependencies
38
- RUN --mount=type=cache,target=/root/.cache/uv \
39
- if [ -f uv.lock ]; then \
40
- uv sync --frozen --no-dev; \
41
- else \
42
- uv sync --no-dev; \
43
- fi
44
-
45
- # Install openenv-core
46
- RUN --mount=type=cache,target=/root/.cache/uv \
47
- if [ -f uv.lock ]; then \
48
- uv pip install openenv-core --python .venv/bin/python; \
49
- else \
50
- uv pip install openenv-core --python .venv/bin/python; \
51
- fi
52
-
53
- # Runtime stage
54
- FROM ghcr.io/meta-pytorch/openenv-base:latest
55
-
56
- WORKDIR /app
57
 
58
- # Copy virtual environment and app
59
- COPY --from=builder /app/env/.venv /app/.venv
60
- COPY --from=builder /app/env /app/env
61
 
62
- ENV PATH="/app/.venv/bin:$PATH"
63
  ENV PYTHONPATH="/app/env:$PYTHONPATH"
64
 
65
- WORKDIR /app/env
66
-
67
  # Expose port
68
  EXPOSE 7860
69
 
70
- # Start the server
71
  CMD ["uvicorn", "server.app:app", "--host", "0.0.0.0", "--port", "7860"]
 
11
  # The build script (openenv build) handles context detection and sets appropriate build args.
12
 
13
  # Use OpenEnv base image
14
+ FROM ghcr.io/meta-pytorch/openenv-base:latest
 
 
 
 
 
 
 
 
 
 
 
 
15
 
16
  WORKDIR /app/env
17
 
18
+ # Copy project files
19
+ COPY . /app/env
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
 
21
+ # Install dependencies directly via pip
22
+ RUN pip install --no-cache-dir -r server/requirements.txt
 
23
 
24
+ # Set environment variables
25
  ENV PYTHONPATH="/app/env:$PYTHONPATH"
26
 
 
 
27
  # Expose port
28
  EXPOSE 7860
29
 
30
+ # Start server
31
  CMD ["uvicorn", "server.app:app", "--host", "0.0.0.0", "--port", "7860"]