n0v33n commited on
Commit
b79d281
·
1 Parent(s): b9dd1b3

update commit

Browse files
Files changed (1) hide show
  1. DockerFile +11 -5
DockerFile CHANGED
@@ -1,8 +1,14 @@
1
  FROM python:3.11-slim
 
 
 
 
 
 
2
  WORKDIR /app
3
- COPY requirements.txt .
4
- RUN pip install -r requirements.txt
5
- COPY . .
6
- EXPOSE 8080
7
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8080"]
8
 
 
 
 
 
 
 
1
  FROM python:3.11-slim
2
+ # FROM python:3.9
3
+
4
+ RUN useradd -m -u 1000 user
5
+ USER user
6
+ ENV PATH="/home/user/.local/bin:$PATH"
7
+
8
  WORKDIR /app
 
 
 
 
 
9
 
10
+ COPY --chown=user ./requirements.txt requirements.txt
11
+ RUN pip install --no-cache-dir --upgrade -r requirements.txt
12
+
13
+ COPY --chown=user . /app
14
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]