sam2ai commited on
Commit
46bec16
·
1 Parent(s): b5edc51

Synced repo using 'sync_with_huggingface' Github Action

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -13
Dockerfile CHANGED
@@ -1,17 +1,5 @@
1
  FROM nvidia/cuda:11.7.1-cudnn8-runtime-ubuntu20.04
2
 
3
- ### Set up user with permissions
4
- # Set up a new user named "user" with user ID 1000
5
- RUN useradd -m -u 1000 user
6
-
7
- # Switch to the "user" user
8
- USER user
9
-
10
-
11
- # Set home to the user's home directory
12
- ENV HOME=/home/user \
13
- PATH=/home/user/.local/bin:$PATH
14
-
15
  # Use Python 3.11 for better Python perf
16
  # Update the package lists and install necessary dependencies
17
  RUN apt-get update && apt-get install -y \
@@ -42,6 +30,18 @@ ENV PYTHONUNBUFFERED=1
42
  # RUN apt-get update && \
43
  # apt-get install -y python3-pip
44
 
 
 
 
 
 
 
 
 
 
 
 
 
45
  # Set the working directory. /app is mounted to the container with -v,
46
  # but we want to have the right cwd for uvicorn command below
47
  RUN mkdir $HOME/app
@@ -63,7 +63,7 @@ COPY ./utils /app/utils
63
  COPY ./app.py /app/app.py
64
  COPY ./download.py /app/download.py
65
 
66
- WORKDIR /app
67
 
68
 
69
  # Install the app dependencies
 
1
  FROM nvidia/cuda:11.7.1-cudnn8-runtime-ubuntu20.04
2
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  # Use Python 3.11 for better Python perf
4
  # Update the package lists and install necessary dependencies
5
  RUN apt-get update && apt-get install -y \
 
30
  # RUN apt-get update && \
31
  # apt-get install -y python3-pip
32
 
33
+ ### Set up user with permissions
34
+ # Set up a new user named "user" with user ID 1000
35
+ RUN useradd -m -u 1000 user
36
+
37
+ # Switch to the "user" user
38
+ USER user
39
+
40
+
41
+ # Set home to the user's home directory
42
+ ENV HOME=/home/user \
43
+ PATH=/home/user/.local/bin:$PATH
44
+
45
  # Set the working directory. /app is mounted to the container with -v,
46
  # but we want to have the right cwd for uvicorn command below
47
  RUN mkdir $HOME/app
 
63
  COPY ./app.py /app/app.py
64
  COPY ./download.py /app/download.py
65
 
66
+ WORKDIR $HOME/app
67
 
68
 
69
  # Install the app dependencies