kumahiyo commited on
Commit
d08fd88
1 Parent(s): dc6ab6b

change docker os

Browse files
Files changed (3) hide show
  1. Dockerfile +39 -4
  2. requirements.txt +0 -1
  3. requirements_cuda.txt +0 -4
Dockerfile CHANGED
@@ -1,15 +1,50 @@
1
- # Use the official Python 3.9 image
2
- FROM python:3.9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
 
4
  # Set the working directory to /code
5
  WORKDIR /code
6
 
7
  # Copy the current directory contents into the container at /code
8
- COPY ./requirements_cuda.txt /code/requirements_cuda.txt
9
  COPY ./requirements.txt /code/requirements.txt
10
 
11
  # Install requirements.txt
12
- RUN pip install --no-cache-dir --upgrade -r /code/requirements_cuda.txt
13
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
14
 
15
  # Set up a new user named "user" with user ID 1000
 
1
+ FROM nvidia/cuda:11.7.1-cudnn8-runtime-ubuntu20.04
2
+
3
+ ENV DEBIAN_FRONTEND=noninteractive
4
+
5
+ RUN apt update && \
6
+ apt install -y bash \
7
+ build-essential \
8
+ git \
9
+ git-lfs \
10
+ curl \
11
+ ca-certificates \
12
+ libsndfile1-dev \
13
+ python3.8 \
14
+ python3-pip \
15
+ python3.8-venv && \
16
+ rm -rf /var/lib/apt/lists
17
+
18
+ # make sure to use venv
19
+ RUN python3 -m venv /opt/venv
20
+ ENV PATH="/opt/venv/bin:$PATH"
21
+
22
+ # pre-install the heavy dependencies (these can later be overridden by the deps from setup.py)
23
+ RUN python3 -m pip install --no-cache-dir --upgrade pip && \
24
+ python3 -m pip install --no-cache-dir \
25
+ torch \
26
+ torchvision \
27
+ torchaudio \
28
+ --extra-index-url https://download.pytorch.org/whl/cu117 && \
29
+ python3 -m pip install --no-cache-dir \
30
+ accelerate \
31
+ datasets \
32
+ hf-doc-builder \
33
+ huggingface-hub \
34
+ Jinja2 \
35
+ librosa \
36
+ numpy \
37
+ scipy \
38
+ tensorboard \
39
+ transformers
40
 
41
  # Set the working directory to /code
42
  WORKDIR /code
43
 
44
  # Copy the current directory contents into the container at /code
 
45
  COPY ./requirements.txt /code/requirements.txt
46
 
47
  # Install requirements.txt
 
48
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
49
 
50
  # Set up a new user named "user" with user ID 1000
requirements.txt CHANGED
@@ -1,6 +1,5 @@
1
  fastapi==0.74.*
2
  requests==2.27.*
3
  sentencepiece==0.1.*
4
- transformers==4.*
5
  uvicorn[standard]==0.17.*
6
  diffusers[torch]==0.13.*
 
1
  fastapi==0.74.*
2
  requests==2.27.*
3
  sentencepiece==0.1.*
 
4
  uvicorn[standard]==0.17.*
5
  diffusers[torch]==0.13.*
requirements_cuda.txt DELETED
@@ -1,4 +0,0 @@
1
- --extra-index-url https://download.pytorch.org/whl/cu117
2
- torch
3
- torchvision
4
- torchaudio