Spaces:
Sleeping
Sleeping
user
Browse files- Dockerfile +7 -2
Dockerfile
CHANGED
@@ -1,14 +1,19 @@
|
|
1 |
FROM python:3.9
|
2 |
#-slim
|
|
|
|
|
|
|
|
|
|
|
3 |
|
4 |
WORKDIR /app
|
5 |
|
6 |
-
COPY requirements.txt ./
|
7 |
|
8 |
RUN pip install -r requirements.txt
|
9 |
|
10 |
EXPOSE 7860
|
11 |
|
12 |
-
COPY . .
|
13 |
|
14 |
CMD ["uvicorn", "src.main_sentiment:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
1 |
FROM python:3.9
|
2 |
#-slim
|
3 |
+
# Set up a new user named "user" with user ID 1000
|
4 |
+
RUN useradd -m -u 1000 user
|
5 |
+
|
6 |
+
# Switch to the "user" user
|
7 |
+
USER user
|
8 |
|
9 |
WORKDIR /app
|
10 |
|
11 |
+
COPY --chown=user requirements.txt ./
|
12 |
|
13 |
RUN pip install -r requirements.txt
|
14 |
|
15 |
EXPOSE 7860
|
16 |
|
17 |
+
COPY --chown=user . .
|
18 |
|
19 |
CMD ["uvicorn", "src.main_sentiment:app", "--host", "0.0.0.0", "--port", "7860"]
|