shank commited on
Commit
d0d5f60
Β·
1 Parent(s): 2e3be87

fix: resolve pip dependency conflicts for HF Spaces build

Browse files

- requirements.txt: fully pinned compatible versions, no loose bounds
- pyproject.toml: cleared dependencies[] to prevent pip installing
torch/openenv-core/openai during Docker build (these caused resolution-too-deep)
- .dockerignore: exclude uv.lock, test venvs, scratch files from Docker image

Root cause of 'resolution-too-deep':
pyproject.toml was being read by pip during build and its dependencies
(torch>=2.11.0, openenv-core, openai, fastapi==0.110.0) conflicted with
gradio[oauth,mcp]==6.13.0's requirements, creating an unsolvable graph.

Files changed (3) hide show
  1. .dockerignore +15 -0
  2. pyproject.toml +3 -13
  3. requirements.txt +12 -8
.dockerignore CHANGED
@@ -2,6 +2,7 @@
2
  .gitignore
3
  .DS_Store
4
  .venv
 
5
  .pytest_cache
6
  __pycache__
7
  *.pyc
@@ -23,3 +24,17 @@ build
23
  .cursor
24
  .vscode
25
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  .gitignore
3
  .DS_Store
4
  .venv
5
+ .env
6
  .pytest_cache
7
  __pycache__
8
  *.pyc
 
24
  .cursor
25
  .vscode
26
 
27
+ # uv lock file (not needed in Docker, causes confusion)
28
+ uv.lock
29
+
30
+ # Test venvs created during debugging
31
+ venv_test*
32
+ .tmp_venv
33
+
34
+ # Scratch test scripts
35
+ test_pip*.sh
36
+ req_test*.txt
37
+ get_logs.py
38
+
39
+ # Large temp dirs
40
+ scratch/
pyproject.toml CHANGED
@@ -8,19 +8,9 @@ version = "1.0.0"
8
  description = "An OpenEnv-compliant debugging environment for AI agents"
9
  readme = "README.md"
10
  requires-python = ">=3.10"
11
- dependencies = [
12
- "fastapi==0.110.0",
13
- "uvicorn==0.29.0",
14
- "pydantic>=2.9.0",
15
- "openai==2.7.2",
16
- "openenv-core>=0.2.0",
17
- "requests==2.31.0",
18
- "python-dotenv==1.0.1",
19
- "pytest==8.1.0",
20
- "httpx==0.27.0",
21
- "RestrictedPython==7.0",
22
- "torch>=2.11.0",
23
- ]
24
 
25
  [tool.setuptools.packages.find]
26
  include = ["env*", "server*"]
 
8
  description = "An OpenEnv-compliant debugging environment for AI agents"
9
  readme = "README.md"
10
  requires-python = ">=3.10"
11
+ # Dependencies are managed via requirements.txt to avoid pip resolution conflicts
12
+ # during HF Spaces Docker builds. Keep this list empty.
13
+ dependencies = []
 
 
 
 
 
 
 
 
 
 
14
 
15
  [tool.setuptools.packages.find]
16
  include = ["env*", "server*"]
requirements.txt CHANGED
@@ -1,10 +1,14 @@
1
- gradio[oauth,mcp]==6.13.0
2
- pydantic>=2.0.0
3
- wandb>=0.18.0
4
- datasets>=3.0.0
5
- transformers>=4.46.0
6
- accelerate>=1.0.0
 
 
 
7
  trl==0.14.0
8
- mergekit
9
- bitsandbytes>=0.43.0
10
  peft==0.13.2
 
 
 
 
1
+ # ── Training dependencies ──────────────────────────────────────────────────────
2
+ # Fully pinned to a pre-validated compatible set.
3
+ # DO NOT add loose deps here β€” they cause pip backtracking (resolution-too-deep).
4
+ # gradio is intentionally omitted: HF Spaces injects gradio[oauth,mcp]==6.13.0 itself.
5
+
6
+ wandb==0.18.7
7
+ datasets==3.0.2
8
+ transformers==4.46.3
9
+ accelerate==1.0.1
10
  trl==0.14.0
 
 
11
  peft==0.13.2
12
+ bitsandbytes==0.43.3
13
+ mergekit==0.1.4
14
+ pydantic==2.10.6