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

Fix ultralytics installation order

Browse files
Files changed (2) hide show
  1. Dockerfile +6 -10
  2. requirements.txt +1 -4
Dockerfile CHANGED
@@ -2,12 +2,10 @@
2
  # FarmEyes - HuggingFace Spaces Dockerfile (Transformers Version)
3
  # =============================================================================
4
  # Uses official N-ATLaS model via transformers - NO llama-cpp-python needed!
5
- # Fast build, official model support, GPU accelerated.
6
  # =============================================================================
7
 
8
  FROM pytorch/pytorch:2.1.0-cuda11.8-cudnn8-runtime
9
 
10
- # Set environment variables
11
  ENV PYTHONUNBUFFERED=1
12
  ENV HOST=0.0.0.0
13
  ENV PORT=7860
@@ -25,18 +23,16 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
25
  git \
26
  && rm -rf /var/lib/apt/lists/*
27
 
28
- # Upgrade pip first
29
- RUN pip install --no-cache-dir --upgrade pip setuptools wheel
30
 
31
- # Copy requirements
32
- COPY requirements.txt .
33
 
34
- # Install Python dependencies
 
35
  RUN pip install --no-cache-dir -r requirements.txt
36
 
37
- # Verify ultralytics installed
38
- RUN python -c "from ultralytics import YOLO; print('✅ Ultralytics installed successfully')"
39
-
40
  # Copy application code
41
  COPY . .
42
 
 
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
 
 
9
  ENV PYTHONUNBUFFERED=1
10
  ENV HOST=0.0.0.0
11
  ENV PORT=7860
 
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 . .
38
 
requirements.txt CHANGED
@@ -2,7 +2,7 @@
2
  # FarmEyes - Requirements (Transformers Version)
3
  # =============================================================================
4
  # NO llama-cpp-python needed! Uses official N-ATLaS via transformers.
5
- # Note: torch/torchvision already in base Docker image
6
  # =============================================================================
7
 
8
  # Web Framework
@@ -15,9 +15,6 @@ transformers>=4.35.0
15
  accelerate>=0.25.0
16
  huggingface-hub>=0.19.0
17
 
18
- # AI/ML - Vision (for YOLOv11)
19
- ultralytics>=8.0.0
20
-
21
  # Audio Processing (for Whisper)
22
  openai-whisper>=20231117
23
  soundfile>=0.12.0
 
2
  # FarmEyes - Requirements (Transformers Version)
3
  # =============================================================================
4
  # NO llama-cpp-python needed! Uses official N-ATLaS via transformers.
5
+ # Note: torch already in base image, ultralytics installed in Dockerfile
6
  # =============================================================================
7
 
8
  # Web Framework
 
15
  accelerate>=0.25.0
16
  huggingface-hub>=0.19.0
17
 
 
 
 
18
  # Audio Processing (for Whisper)
19
  openai-whisper>=20231117
20
  soundfile>=0.12.0