lolout1 commited on
Commit
00d15ff
·
1 Parent(s): 83b4d0c

Docker and req.txt changes

Browse files
Files changed (2) hide show
  1. Dockerfile +18 -12
  2. requirements.txt +24 -26
Dockerfile CHANGED
@@ -45,16 +45,19 @@ ENV HOME=/home/user \
45
 
46
  WORKDIR /app
47
 
48
- # Install PyTorch 1.9 CPU
49
  RUN pip install --user torch==1.9.0+cpu torchvision==0.10.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
50
 
51
  # Install numpy first (required for other packages)
52
  RUN pip install --user numpy==1.21.6
53
 
54
- # Install core dependencies
55
  RUN pip install --user \
56
  Pillow==8.3.2 \
57
- opencv-python==4.5.5.64 \
 
 
 
58
  scipy==1.7.3 \
59
  scikit-image==0.19.3 \
60
  scikit-learn==1.0.2
@@ -62,10 +65,10 @@ RUN pip install --user \
62
  # Install detectron2 for PyTorch 1.9 CPU
63
  RUN pip install --user detectron2 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cpu/torch1.9/index.html
64
 
65
- # Install pycocotools with pre-built wheel to avoid compilation issues
66
  RUN pip install --user pycocotools --no-build-isolation
67
 
68
- # Install other ML dependencies
69
  RUN pip install --user \
70
  timm==0.4.12 \
71
  einops==0.6.1 \
@@ -74,13 +77,20 @@ RUN pip install --user \
74
  tqdm==4.64.1 \
75
  imutils==0.5.4
76
 
77
- # Install Gradio and web dependencies with compatible versions
78
  RUN pip install --user \
79
- gradio==3.35.2 \
80
- huggingface_hub==0.11.1 \
 
 
81
  fastapi==0.78.0 \
82
  uvicorn==0.18.2
83
 
 
 
 
 
 
84
  # Install remaining dependencies
85
  RUN pip install --user \
86
  PyYAML==5.4.1 \
@@ -91,10 +101,6 @@ RUN pip install --user \
91
  gdown==4.5.4 \
92
  wget==3.2
93
 
94
- # Try NATTEN for CPU (optional - will continue if fails)
95
- RUN pip install --user natten==0.14.6 -f https://shi-labs.com/natten/wheels/cpu/torch1.9/index.html || \
96
- echo "NATTEN installation failed - continuing without it"
97
-
98
  # Copy application files
99
  COPY --chown=user:user . /app
100
 
 
45
 
46
  WORKDIR /app
47
 
48
+ # Install PyTorch 1.9 CPU first
49
  RUN pip install --user torch==1.9.0+cpu torchvision==0.10.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
50
 
51
  # Install numpy first (required for other packages)
52
  RUN pip install --user numpy==1.21.6
53
 
54
+ # Install core dependencies in order
55
  RUN pip install --user \
56
  Pillow==8.3.2 \
57
+ opencv-python==4.5.5.64
58
+
59
+ # Install scientific computing dependencies
60
+ RUN pip install --user \
61
  scipy==1.7.3 \
62
  scikit-image==0.19.3 \
63
  scikit-learn==1.0.2
 
65
  # Install detectron2 for PyTorch 1.9 CPU
66
  RUN pip install --user detectron2 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cpu/torch1.9/index.html
67
 
68
+ # Install pycocotools separately to avoid compilation issues
69
  RUN pip install --user pycocotools --no-build-isolation
70
 
71
+ # Install ML dependencies
72
  RUN pip install --user \
73
  timm==0.4.12 \
74
  einops==0.6.1 \
 
77
  tqdm==4.64.1 \
78
  imutils==0.5.4
79
 
80
+ # Install web framework dependencies with compatible versions
81
  RUN pip install --user \
82
+ httpx==0.23.0 \
83
+ httpcore==0.15.0 \
84
+ anyio==3.6.1 \
85
+ starlette==0.19.1 \
86
  fastapi==0.78.0 \
87
  uvicorn==0.18.2
88
 
89
+ # Install Gradio and HuggingFace Hub with compatible versions
90
+ RUN pip install --user \
91
+ huggingface_hub==0.8.1 \
92
+ gradio==3.1.7
93
+
94
  # Install remaining dependencies
95
  RUN pip install --user \
96
  PyYAML==5.4.1 \
 
101
  gdown==4.5.4 \
102
  wget==3.2
103
 
 
 
 
 
104
  # Copy application files
105
  COPY --chown=user:user . /app
106
 
requirements.txt CHANGED
@@ -2,7 +2,6 @@
2
  --extra-index-url https://download.pytorch.org/whl/cpu
3
  torch==1.9.0+cpu
4
  torchvision==0.10.0+cpu
5
- torchaudio==0.9.0
6
 
7
  # Core dependencies
8
  numpy==1.21.6
@@ -15,32 +14,21 @@ detectron2==0.6
15
  # OpenCV
16
  opencv-python==4.5.5.64
17
 
18
- # Git dependencies
19
-
20
  # Image utilities
21
  imutils==0.5.4
22
 
23
- # NATTEN CPU version for torch 1.9
24
- -f https://shi-labs.com/natten/wheels/cpu/torch1.9/index.html
25
- natten==0.14.6
26
-
27
- # Build tools
28
- cython==0.29.35
29
- setuptools==59.5.0
30
-
31
  # Scientific computing
32
  scipy==1.7.3
33
  shapely==1.8.5
34
  h5py==3.7.0
35
  scikit-image==0.19.3
 
36
 
37
  # Deep learning utilities
38
  timm==0.4.12
39
  einops==0.6.1
40
 
41
  # Development tools
42
- icecream==2.1.3
43
- wandb==0.13.5
44
  tqdm==4.64.1
45
 
46
  # NLP utilities
@@ -51,18 +39,28 @@ inflect==6.0.4
51
  # File utilities
52
  gdown==4.5.4
53
  wget==3.2
54
- huggingface_hub==0.11.1
55
 
56
- # Training framework
57
- pytorch_lightning==1.8.6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
 
59
- # Web interface
60
- gradio==3.35.2
61
- scikit-learn
62
- diffdist
63
- gdown
64
- tqdm
65
- huggingface_hub
66
- wget
67
- # Job submission
68
- submitit==1.4.5
 
2
  --extra-index-url https://download.pytorch.org/whl/cpu
3
  torch==1.9.0+cpu
4
  torchvision==0.10.0+cpu
 
5
 
6
  # Core dependencies
7
  numpy==1.21.6
 
14
  # OpenCV
15
  opencv-python==4.5.5.64
16
 
 
 
17
  # Image utilities
18
  imutils==0.5.4
19
 
 
 
 
 
 
 
 
 
20
  # Scientific computing
21
  scipy==1.7.3
22
  shapely==1.8.5
23
  h5py==3.7.0
24
  scikit-image==0.19.3
25
+ scikit-learn==1.0.2
26
 
27
  # Deep learning utilities
28
  timm==0.4.12
29
  einops==0.6.1
30
 
31
  # Development tools
 
 
32
  tqdm==4.64.1
33
 
34
  # NLP utilities
 
39
  # File utilities
40
  gdown==4.5.4
41
  wget==3.2
 
42
 
43
+ # Compatible web interface versions
44
+ gradio==3.1.7
45
+ huggingface_hub==0.8.1
46
+ fastapi==0.78.0
47
+ uvicorn==0.18.2
48
+
49
+ # YAML support
50
+ PyYAML==5.4.1
51
+
52
+ # Matplotlib
53
+ matplotlib==3.5.3
54
+
55
+ # Build tools
56
+ cython==0.29.35
57
+ setuptools==59.5.0
58
+
59
+ # COCO API
60
+ pycocotools
61
 
62
+ # Additional gradio dependencies
63
+ httpx==0.23.0
64
+ httpcore==0.15.0
65
+ anyio==3.6.1
66
+ starlette==0.19.1