louwjac commited on
Commit
2686e7e
·
1 Parent(s): 300699e

Upload Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +23 -0
Dockerfile ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use the official Python 3.11.2 image
2
+ FROM python:3.11.2
3
+
4
+
5
+ # Set up a new user named "user" with user ID 1000
6
+ RUN useradd -m -u 1000 user
7
+ # Switch to the "user" user
8
+ USER user
9
+ # Set home to the user's home directory
10
+ ENV HOME=/home/user \
11
+ PATH=/home/user/.local/bin:$PATH
12
+
13
+ # Set the working directory to the user's home directory
14
+ WORKDIR $HOME/app
15
+
16
+ RUN --mount=type=secret,id=GIT,mode=0444,required=true \
17
+ git clone https://louwjac:$(cat /run/secrets/GIT)@github.com/louwjac/CycleGAN_demo.git $HOME/app
18
+
19
+ # Install requirements.txt
20
+ RUN pip install --no-cache-dir --upgrade -r requirements.txt
21
+
22
+
23
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]