Spaces:
Running
Running
Huy Nguyen
commited on
Commit
·
cff0bc8
1
Parent(s):
19ac67f
update Dockerfile
Browse files- Dockerfile +7 -1
Dockerfile
CHANGED
@@ -1,11 +1,17 @@
|
|
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 |
COPY . .
|
10 |
|
|
|
|
|
11 |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
1 |
FROM python:3.10
|
2 |
|
3 |
+
RUN useradd -m -u 1000 user
|
4 |
+
|
5 |
+
USER user
|
6 |
+
|
7 |
WORKDIR /code
|
8 |
|
9 |
+
COPY --chown=user ./requirements.txt /code/requirements.txt
|
10 |
|
11 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
12 |
|
13 |
COPY . .
|
14 |
|
15 |
+
RUN mkdir nltk_data
|
16 |
+
|
17 |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|