belal243 commited on
Commit
891ab3d
·
verified ·
1 Parent(s): 839821a

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +18 -0
Dockerfile ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.9
2
+
3
+ # Set up a new user named "user" with user ID 1000
4
+ RUN useradd -m -u 1000 user
5
+ USER user
6
+ ENV PATH="/home/user/.local/bin:$PATH"
7
+
8
+ WORKDIR /app
9
+
10
+ # Install dependencies
11
+ COPY --chown=user ./requirements.txt requirements.txt
12
+ RUN pip install --no-cache-dir --upgrade -r requirements.txt
13
+
14
+ # Copy all your code and model files
15
+ COPY --chown=user . /app
16
+
17
+ # Start the API (We use main:app because we will name our code file main.py)
18
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]