Jayem-11
commited on
Commit
•
fe771c5
1
Parent(s):
07f39f7
updates
Browse files- Dockerfile +11 -2
Dockerfile
CHANGED
@@ -1,3 +1,5 @@
|
|
|
|
|
|
1 |
FROM python:3.9
|
2 |
|
3 |
WORKDIR /code
|
@@ -6,6 +8,13 @@ COPY ./requirements.txt /code/requirements.txt
|
|
6 |
|
7 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
8 |
|
9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
|
11 |
-
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
1 |
+
# you will also find guides on how best to write your Dockerfile
|
2 |
+
|
3 |
FROM python:3.9
|
4 |
|
5 |
WORKDIR /code
|
|
|
8 |
|
9 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
10 |
|
11 |
+
RUN useradd -m -u 1000 user
|
12 |
+
USER user
|
13 |
+
ENV HOME=/home/user \
|
14 |
+
PATH=/home/user/.local/bin:$PATH
|
15 |
+
|
16 |
+
WORKDIR $HOME/app
|
17 |
+
|
18 |
+
COPY --chown=user . $HOME/app
|
19 |
|
20 |
+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|