ncncomplete commited on
Commit
092031c
·
verified ·
1 Parent(s): 9e31281

fix: support flattened HF Space layout

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -4
Dockerfile CHANGED
@@ -13,12 +13,18 @@ RUN apt-get update && apt-get install -y \
13
  curl \
14
  && rm -rf /var/lib/apt/lists/*
15
 
16
- # Copy coding_env package
17
- COPY envs/coding_env/ ./envs/coding_env/
 
 
18
 
19
- # Install openenv-core first from PyPI, then coding_env
20
  RUN pip install --no-cache-dir "openenv-core[core]>=0.2.2" && \
21
- pip install --no-cache-dir ./envs/coding_env/
 
 
 
 
22
 
23
  # Environment variables
24
  ENV PYTHONUNBUFFERED=1
 
13
  curl \
14
  && rm -rf /var/lib/apt/lists/*
15
 
16
+ # Copy repository content.
17
+ # In monorepo builds this includes `envs/coding_env/`.
18
+ # In Hugging Face Space builds this is typically the env root itself.
19
+ COPY . /app
20
 
21
+ # Install openenv-core first, then install coding_env from whichever layout exists.
22
  RUN pip install --no-cache-dir "openenv-core[core]>=0.2.2" && \
23
+ if [ -f /app/envs/coding_env/pyproject.toml ]; then \
24
+ pip install --no-cache-dir /app/envs/coding_env/; \
25
+ else \
26
+ pip install --no-cache-dir /app; \
27
+ fi
28
 
29
  # Environment variables
30
  ENV PYTHONUNBUFFERED=1