yahrkapa commited on
Commit
8211d9e
1 Parent(s): 021b3f8
Files changed (1) hide show
  1. Dockerfile +26 -0
Dockerfile ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10
2
+
3
+ WORKDIR /code
4
+
5
+ COPY ./requirements.txt /code/requirements.txt
6
+
7
+ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
8
+
9
+ RUN useradd -m appuser
10
+
11
+ RUN useradd -m -u 1000 appuser
12
+
13
+ USER appuser
14
+
15
+ ENV HOME=/home/appuser \
16
+ PATH=/home/appuser/.local/bin:$PATH
17
+
18
+ # Set the working directory to the user's home directory
19
+ WORKDIR $HOME/app
20
+
21
+ # Copy the current directory contents into the container at the working directory
22
+ COPY --chown=appuser . $HOME/app
23
+
24
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
25
+
26
+