hoonsubin commited on
Commit
c531635
·
1 Parent(s): f39a39a

fix docker

Browse files
Files changed (2) hide show
  1. .python-version +1 -0
  2. Dockerfile +16 -9
.python-version ADDED
@@ -0,0 +1 @@
 
 
1
+ 3.10
Dockerfile CHANGED
@@ -2,8 +2,9 @@ FROM python:3.10-slim
2
 
3
  WORKDIR /app
4
 
5
- # Install system dependencies
6
  RUN apt-get update && apt-get install -y \
 
7
  libportaudio2 \
8
  libportaudiocpp0 \
9
  portaudio19-dev \
@@ -17,12 +18,13 @@ RUN apt-get update && apt-get install -y \
17
  libopenblas0-pthread \
18
  libgl1 \
19
  libglib2.0-0 \
20
- gcc \
 
 
21
  espeak-ng \
22
  libaio-dev \
23
  ffmpeg \
24
  curl \
25
- build-essential \
26
  && rm -rf /var/lib/apt/lists/*
27
 
28
  # Install Rust compiler
@@ -37,10 +39,14 @@ RUN rustc --version && cargo --version
37
 
38
  # Update pip and install base requirements
39
  RUN pip install --upgrade pip setuptools wheel && \
40
- pip install numpy==1.26.4
 
 
 
 
41
 
42
  # Install Base PyTorch System - For CPU-only
43
- RUN pip3 install \
44
  torch \
45
  torchvision \
46
  torchaudio \
@@ -50,13 +56,13 @@ RUN pip3 install \
50
  transformers \
51
  --extra-index-url https://download.pytorch.org/whl/cpu
52
 
 
 
 
53
  # Install Python requirements with CPU-only constraints
54
  COPY requirements.txt .
55
  RUN pip install --no-cache-dir -r requirements.txt --no-deps
56
 
57
- # Fix networkx compatibility
58
- RUN pip install --force-reinstall networkx==3.2.1
59
-
60
  # Install unidic for processing Japanese texts
61
  RUN python -m unidic download
62
 
@@ -66,7 +72,8 @@ COPY . .
66
  # Environment variables for CPU-only operation
67
  ENV CUDA_VISIBLE_DEVICES=-1 \
68
  TF_CPP_MIN_LOG_LEVEL=3 \
69
- SDL_AUDIODRIVER=disk
 
70
 
71
  EXPOSE 7860
72
  CMD ["python", "app.py"]
 
2
 
3
  WORKDIR /app
4
 
5
+ # Install system dependencies (probably more than needed)
6
  RUN apt-get update && apt-get install -y \
7
+ build-essential \
8
  libportaudio2 \
9
  libportaudiocpp0 \
10
  portaudio19-dev \
 
18
  libopenblas0-pthread \
19
  libgl1 \
20
  libglib2.0-0 \
21
+ libnuma-dev \
22
+ gcc-12 \
23
+ g++-12 \
24
  espeak-ng \
25
  libaio-dev \
26
  ffmpeg \
27
  curl \
 
28
  && rm -rf /var/lib/apt/lists/*
29
 
30
  # Install Rust compiler
 
39
 
40
  # Update pip and install base requirements
41
  RUN pip install --upgrade pip setuptools wheel && \
42
+ pip install numpy \
43
+ "cmake>=3.26" \
44
+ packaging \
45
+ ninja \
46
+ "setuptools-scm>=8"
47
 
48
  # Install Base PyTorch System - For CPU-only
49
+ RUN pip install \
50
  torch \
51
  torchvision \
52
  torchaudio \
 
56
  transformers \
57
  --extra-index-url https://download.pytorch.org/whl/cpu
58
 
59
+ # Fix networkx compatibility
60
+ RUN pip install --force-reinstall networkx==3.2.1
61
+
62
  # Install Python requirements with CPU-only constraints
63
  COPY requirements.txt .
64
  RUN pip install --no-cache-dir -r requirements.txt --no-deps
65
 
 
 
 
66
  # Install unidic for processing Japanese texts
67
  RUN python -m unidic download
68
 
 
72
  # Environment variables for CPU-only operation
73
  ENV CUDA_VISIBLE_DEVICES=-1 \
74
  TF_CPP_MIN_LOG_LEVEL=3 \
75
+ SDL_AUDIODRIVER=disk \
76
+ VLLM_TARGET_DEVICE=cpu
77
 
78
  EXPOSE 7860
79
  CMD ["python", "app.py"]