FardinHash commited on
Commit
90c6263
Β·
1 Parent(s): 02461be

fix: error

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -8
Dockerfile CHANGED
@@ -1,12 +1,9 @@
1
- # Use an official Python runtime as a parent image
2
- FROM python:3.12
3
 
4
  # Set the working directory in the container
5
  WORKDIR /usr/src/app
6
 
7
- # Copy the current directory contents into the container at /usr/src/app
8
- COPY . .
9
-
10
  # Install system dependencies
11
  RUN apt-get update && apt-get install -y \
12
  ffmpeg \
@@ -15,6 +12,16 @@ RUN apt-get update && apt-get install -y \
15
  git \
16
  && rm -rf /var/lib/apt/lists/*
17
 
 
 
 
 
 
 
 
 
 
 
18
  # Install Python dependencies
19
  RUN pip install --no-cache-dir -r requirements.txt
20
 
@@ -22,9 +29,6 @@ RUN pip install --no-cache-dir -r requirements.txt
22
  RUN pip install packaging ninja
23
  RUN pip install flash-attn --no-build-isolation
24
 
25
- # Install additional CUDA dependencies for Flash Attention 2
26
- RUN pip install triton
27
-
28
  # Expose port 7860 for Gradio
29
  EXPOSE 7860
30
 
 
1
+ # Use an official CUDA runtime as a parent image
2
+ FROM nvidia/cuda:12.1-cudnn8-runtime-ubuntu20.04
3
 
4
  # Set the working directory in the container
5
  WORKDIR /usr/src/app
6
 
 
 
 
7
  # Install system dependencies
8
  RUN apt-get update && apt-get install -y \
9
  ffmpeg \
 
12
  git \
13
  && rm -rf /var/lib/apt/lists/*
14
 
15
+ # Install Python 3.12 and pip
16
+ RUN apt-get update && apt-get install -y python3.12 python3.12-venv python3.12-dev && \
17
+ curl -sS https://bootstrap.pypa.io/get-pip.py | python3.12
18
+
19
+ # Set Python 3.12 as the default python
20
+ RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.12 1
21
+
22
+ # Copy the current directory contents into the container at /usr/src/app
23
+ COPY . .
24
+
25
  # Install Python dependencies
26
  RUN pip install --no-cache-dir -r requirements.txt
27
 
 
29
  RUN pip install packaging ninja
30
  RUN pip install flash-attn --no-build-isolation
31
 
 
 
 
32
  # Expose port 7860 for Gradio
33
  EXPOSE 7860
34