Fola-AI commited on
Commit
975efeb
·
1 Parent(s): 094d3a4

Debug ultralytics installation with version pin

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -7
Dockerfile CHANGED
@@ -1,8 +1,6 @@
1
  # =============================================================================
2
  # FarmEyes - HuggingFace Spaces Dockerfile (Transformers Version)
3
  # =============================================================================
4
- # Uses official N-ATLaS model via transformers - NO llama-cpp-python needed!
5
- # =============================================================================
6
 
7
  FROM pytorch/pytorch:2.1.0-cuda11.8-cudnn8-runtime
8
 
@@ -21,17 +19,19 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
21
  libgl1 \
22
  libglib2.0-0 \
23
  git \
 
24
  && rm -rf /var/lib/apt/lists/*
25
 
26
  # Upgrade pip
27
- RUN pip install --no-cache-dir --upgrade pip
28
 
29
- # Install ultralytics first (has specific dependencies)
30
- RUN pip install --no-cache-dir ultralytics
 
31
 
32
- # Copy and install remaining requirements
33
  COPY requirements.txt .
34
- RUN pip install --no-cache-dir -r requirements.txt
35
 
36
  # Copy application code
37
  COPY . .
@@ -39,6 +39,9 @@ COPY . .
39
  # Create directories
40
  RUN mkdir -p /app/uploads /app/temp
41
 
 
 
 
42
  EXPOSE 7860
43
 
44
  CMD ["python", "main.py"]
 
1
  # =============================================================================
2
  # FarmEyes - HuggingFace Spaces Dockerfile (Transformers Version)
3
  # =============================================================================
 
 
4
 
5
  FROM pytorch/pytorch:2.1.0-cuda11.8-cudnn8-runtime
6
 
 
19
  libgl1 \
20
  libglib2.0-0 \
21
  git \
22
+ curl \
23
  && rm -rf /var/lib/apt/lists/*
24
 
25
  # Upgrade pip
26
+ RUN pip install --upgrade pip setuptools wheel
27
 
28
+ # Install ultralytics with verbose output
29
+ RUN pip install ultralytics==8.0.200 && \
30
+ python -c "import ultralytics; print('Ultralytics version:', ultralytics.__version__)"
31
 
32
+ # Copy requirements and install
33
  COPY requirements.txt .
34
+ RUN pip install -r requirements.txt
35
 
36
  # Copy application code
37
  COPY . .
 
39
  # Create directories
40
  RUN mkdir -p /app/uploads /app/temp
41
 
42
+ # Final check - list installed packages
43
+ RUN pip list | grep -i ultra
44
+
45
  EXPOSE 7860
46
 
47
  CMD ["python", "main.py"]