Spaces:
Sleeping
Sleeping
mateoluksenberg
commited on
Commit
•
f066964
1
Parent(s):
63ff059
Update Dockerfile
Browse files- Dockerfile +7 -15
Dockerfile
CHANGED
@@ -1,21 +1,13 @@
|
|
1 |
-
|
2 |
-
FROM python:3.8-slim
|
3 |
|
4 |
-
|
5 |
-
WORKDIR /app
|
6 |
|
7 |
-
|
8 |
-
RUN pip install transformers pillow tensorflow
|
9 |
|
10 |
-
|
11 |
-
RUN mkdir -p /.cache/huggingface/hub && chmod -R a+rw /.cache/huggingface
|
12 |
|
13 |
-
|
14 |
-
COPY app.py .
|
15 |
-
COPY cm5.jpg .
|
16 |
|
17 |
-
|
18 |
-
ENV TRANSFORMERS_CACHE /.cache/huggingface/hub
|
19 |
|
20 |
-
|
21 |
-
CMD ["python", "app.py"]
|
|
|
1 |
+
FROM python:3.9
|
|
|
2 |
|
3 |
+
RUN useradd -m -u 1000 user
|
|
|
4 |
|
5 |
+
WORKDIR /app
|
|
|
6 |
|
7 |
+
COPY --chown=user ./requirements.txt requirements.txt
|
|
|
8 |
|
9 |
+
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
|
|
|
|
10 |
|
11 |
+
COPY --chown=user . /app
|
|
|
12 |
|
13 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|