Spaces:
Sleeping
Sleeping
fix: support flattened HF Space layout
Browse files- 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
|
| 17 |
-
|
|
|
|
|
|
|
| 18 |
|
| 19 |
-
# Install openenv-core first
|
| 20 |
RUN pip install --no-cache-dir "openenv-core[core]>=0.2.2" && \
|
| 21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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
|