arshtech commited on
Commit
9d18220
·
verified ·
1 Parent(s): a58186f

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -9
Dockerfile CHANGED
@@ -1,12 +1,13 @@
1
- # Using Python 3.9 base image
2
  FROM python:3.9
3
- # Set the working directory to /code
4
- WORKDIR /code
5
- # Copy requirements.txt to /code
6
- COPY ./requirements.txt /code/requirements.txt
7
- # Install dependencies from requirements.txt
8
- RUN pip install -r requirements.txt
9
 
10
- COPY . /code
 
 
11
 
12
- CMD ["gunicorn","main:app","-b","0.0.0.0:7860"]
 
 
 
 
 
 
 
 
1
  FROM python:3.9
 
 
 
 
 
 
2
 
3
+ RUN useradd -m -u 1000 user
4
+ USER user
5
+ ENV PATH="/home/user/.local/bin:$PATH"
6
 
7
+ WORKDIR /app
8
+
9
+ COPY --chown=user ./requirements.txt requirements.txt
10
+ RUN pip install --no-cache-dir --upgrade -r requirements.txt
11
+
12
+ COPY --chown=user . /app
13
+ CMD ["gunicorn", "app:app", "-b", "0.0.0.0:7860"]