jclyo1 commited on
Commit
7d6c71c
1 Parent(s): 21fa99a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -16
Dockerfile CHANGED
@@ -5,29 +5,21 @@ FROM nvidia/cuda:12.0.0-cudnn8-devel-ubuntu22.04
5
  # and install (with the yes flag `-y`)
6
  # Python and Pip
7
  RUN apt-get update && apt-get install -y \
8
- python3-pip \
9
- wget \
10
- sudo \
11
- vim
12
 
13
 
14
- # RUN cargo install os_info_cli
15
-
16
  WORKDIR /code
17
 
18
  COPY ./requirements.txt /code/requirements.txt
19
 
20
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
21
 
22
- RUN pip install diffusers transformers accelerate scipy safetensors
23
-
24
-
25
-
26
  # Set up a new user named "user" with user ID 1000
27
  RUN useradd -m -u 1000 user
28
 
29
  # Switch to the "user" user
30
  USER user
 
31
  # Set home to the user's home directory
32
  ENV HOME=/home/user \
33
  PATH=/home/user/.local/bin:$PATH
@@ -38,20 +30,16 @@ WORKDIR $HOME/app
38
  # Copy the current directory contents into the container at $HOME/app setting the owner to the user
39
  COPY --chown=user . $HOME/app
40
 
41
- # Download and uzip truepic-size from Google Drive
42
  RUN pip install gdown
43
  RUN --mount=type=secret,id=truepic_sign_gdoc_id,mode=0444,required=true \
44
  gdown --id $(cat /run/secrets/truepic_sign_gdoc_id)
45
  RUN tar -xf truepic-sign-v0.3.1-ubuntu-20.04.tar.gz
46
  RUN chmod +x truepic-sign
47
 
48
- RUN --mount=type=secret,id=api_key,mode=0444,required=true \
49
  ./truepic-sign init file-system --api-key $(cat /run/secrets/api_key)
50
 
51
- # RUN ./truepic-sign enroll
52
-
53
  WORKDIR $HOME/app
54
 
55
- # COPY . .
56
-
57
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
 
5
  # and install (with the yes flag `-y`)
6
  # Python and Pip
7
  RUN apt-get update && apt-get install -y \
8
+ python3-pip
 
 
 
9
 
10
 
 
 
11
  WORKDIR /code
12
 
13
  COPY ./requirements.txt /code/requirements.txt
14
 
15
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
16
 
 
 
 
 
17
  # Set up a new user named "user" with user ID 1000
18
  RUN useradd -m -u 1000 user
19
 
20
  # Switch to the "user" user
21
  USER user
22
+
23
  # Set home to the user's home directory
24
  ENV HOME=/home/user \
25
  PATH=/home/user/.local/bin:$PATH
 
30
  # Copy the current directory contents into the container at $HOME/app setting the owner to the user
31
  COPY --chown=user . $HOME/app
32
 
33
+ # Download and uzip truepic-sign from Google Drive
34
  RUN pip install gdown
35
  RUN --mount=type=secret,id=truepic_sign_gdoc_id,mode=0444,required=true \
36
  gdown --id $(cat /run/secrets/truepic_sign_gdoc_id)
37
  RUN tar -xf truepic-sign-v0.3.1-ubuntu-20.04.tar.gz
38
  RUN chmod +x truepic-sign
39
 
40
+ # RUN --mount=type=secret,id=api_key,mode=0444,required=true \
41
  ./truepic-sign init file-system --api-key $(cat /run/secrets/api_key)
42
 
 
 
43
  WORKDIR $HOME/app
44
 
 
 
45
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]