Fola-AI commited on
Commit
3c50e55
·
1 Parent(s): bcc0750

Upgrade to GPU with GGUF model support

Browse files
Files changed (3) hide show
  1. .DS_Store +0 -0
  2. Dockerfile +25 -9
  3. requirements.txt +3 -0
.DS_Store CHANGED
Binary files a/.DS_Store and b/.DS_Store differ
 
Dockerfile CHANGED
@@ -1,32 +1,48 @@
1
  # =============================================================================
2
- # FarmEyes - HuggingFace Spaces Dockerfile
3
  # =============================================================================
4
 
5
- FROM python:3.10-slim
6
-
7
- WORKDIR /app
8
 
 
9
  ENV PYTHONUNBUFFERED=1
10
  ENV HOST=0.0.0.0
11
  ENV PORT=7860
12
- ENV PIP_NO_CACHE_DIR=1
 
 
13
 
14
- # Install system dependencies
15
  RUN apt-get update && apt-get install -y --no-install-recommends \
 
 
 
16
  ffmpeg \
17
  libsm6 \
18
  libxext6 \
19
  libgl1 \
 
 
 
20
  && rm -rf /var/lib/apt/lists/*
21
 
22
- # Copy and install requirements
 
 
 
23
  COPY requirements.txt .
24
- RUN pip install --upgrade pip && \
25
- pip install -r requirements.txt
 
 
 
 
 
26
 
27
  # Copy application code
28
  COPY . .
29
 
 
30
  RUN mkdir -p /app/uploads /app/temp
31
 
32
  EXPOSE 7860
 
1
  # =============================================================================
2
+ # FarmEyes - HuggingFace Spaces Dockerfile (GPU Version)
3
  # =============================================================================
4
 
5
+ FROM nvidia/cuda:11.8.0-devel-ubuntu22.04
 
 
6
 
7
+ # Set environment variables
8
  ENV PYTHONUNBUFFERED=1
9
  ENV HOST=0.0.0.0
10
  ENV PORT=7860
11
+ ENV DEBIAN_FRONTEND=noninteractive
12
+
13
+ WORKDIR /app
14
 
15
+ # Install Python and system dependencies
16
  RUN apt-get update && apt-get install -y --no-install-recommends \
17
+ python3.10 \
18
+ python3-pip \
19
+ python3.10-dev \
20
  ffmpeg \
21
  libsm6 \
22
  libxext6 \
23
  libgl1 \
24
+ build-essential \
25
+ cmake \
26
+ git \
27
  && rm -rf /var/lib/apt/lists/*
28
 
29
+ # Make python3.10 the default
30
+ RUN ln -sf /usr/bin/python3.10 /usr/bin/python
31
+
32
+ # Copy requirements
33
  COPY requirements.txt .
34
+
35
+ # Upgrade pip and install dependencies
36
+ RUN pip install --no-cache-dir --upgrade pip && \
37
+ pip install --no-cache-dir -r requirements.txt
38
+
39
+ # Install llama-cpp-python with CUDA support
40
+ RUN CMAKE_ARGS="-DLLAMA_CUBLAS=on" pip install --no-cache-dir llama-cpp-python
41
 
42
  # Copy application code
43
  COPY . .
44
 
45
+ # Create directories
46
  RUN mkdir -p /app/uploads /app/temp
47
 
48
  EXPOSE 7860
requirements.txt CHANGED
@@ -10,6 +10,9 @@ ultralytics>=8.0.0
10
  transformers>=4.35.0
11
  huggingface-hub>=0.19.0
12
 
 
 
 
13
  # Audio
14
  openai-whisper>=20231117
15
  soundfile>=0.12.0
 
10
  transformers>=4.35.0
11
  huggingface-hub>=0.19.0
12
 
13
+ # GGUF Model Support (for N-ATLaS)
14
+ llama-cpp-python>=0.2.0
15
+
16
  # Audio
17
  openai-whisper>=20231117
18
  soundfile>=0.12.0