LeoNguyen commited on
Commit
bfc6577
·
1 Parent(s): d9de609

Refactor Dockerfile and requirements: Simplify Python installation by removing unnecessary packages and adjust pip command in Dockerfile. Comment out unused dependencies in requirements_for_server.txt for clarity.

Browse files
Files changed (2) hide show
  1. Dockerfile +2 -8
  2. requirements_for_server.txt +5 -5
Dockerfile CHANGED
@@ -9,15 +9,9 @@ ENV PYTHONDONTWRITEBYTECODE=1 \
9
  WORKDIR /src
10
 
11
  # Install Python 3.11 and dependencies
12
- RUN apt-get update && apt-get install -y software-properties-common && \
13
- add-apt-repository ppa:deadsnakes/ppa && \
14
- apt-get update && apt-get install -y \
15
  python3.11 \
16
- python3.11-distutils \
17
- python3.11-venv \
18
  python3-pip \
19
- cuda-toolkit-12-9 \
20
- cuda-runtime-12-9 \
21
  && mkdir -p /etc/OpenCL/vendors \
22
  && echo "libnvidia-opencl.so.1" > /etc/OpenCL/vendors/nvidia.icd \
23
  && apt-get clean \
@@ -33,7 +27,7 @@ COPY requirements_for_server.txt ./
33
 
34
  # 3. Cài đặt gói từ local
35
  # RUN pip install --no-cache-dir --find-links=/tmp/local_packages_for_server -r requirements_for_server.txt
36
- RUN pip install --no-cache-dir -r requirements_for_server.txt
37
  # 4. Copy mã nguồn
38
  COPY src/ .
39
 
 
9
  WORKDIR /src
10
 
11
  # Install Python 3.11 and dependencies
12
+ RUN apt-get update && apt-get install -y \
 
 
13
  python3.11 \
 
 
14
  python3-pip \
 
 
15
  && mkdir -p /etc/OpenCL/vendors \
16
  && echo "libnvidia-opencl.so.1" > /etc/OpenCL/vendors/nvidia.icd \
17
  && apt-get clean \
 
27
 
28
  # 3. Cài đặt gói từ local
29
  # RUN pip install --no-cache-dir --find-links=/tmp/local_packages_for_server -r requirements_for_server.txt
30
+ RUN pip install -r requirements_for_server.txt
31
  # 4. Copy mã nguồn
32
  COPY src/ .
33
 
requirements_for_server.txt CHANGED
@@ -4,11 +4,11 @@ requests == 2.32.3
4
  huggingface-hub == 0.32.0
5
 
6
  # If use diffusers
7
- diffusers == 0.33.1
8
- accelerate == 1.6.0
9
- transformers == 4.52.4
10
- torch==2.7.0
11
- --extra-index-url https://download.pytorch.org/whl/cu128
12
 
13
  # # # Offline install
14
  # bitsandbytes -f ./local_packages_for_server/bitsandbytes-0.46.0-cp311-cp311-linux_x86_64.whl
 
4
  huggingface-hub == 0.32.0
5
 
6
  # If use diffusers
7
+ # diffusers == 0.33.1
8
+ # accelerate == 1.6.0
9
+ # transformers == 4.52.4
10
+ # torch==2.7.0
11
+ # --extra-index-url https://download.pytorch.org/whl/cu128
12
 
13
  # # # Offline install
14
  # bitsandbytes -f ./local_packages_for_server/bitsandbytes-0.46.0-cp311-cp311-linux_x86_64.whl