Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +19 -3
Dockerfile
CHANGED
@@ -1,11 +1,27 @@
|
|
1 |
FROM python:3.9
|
2 |
|
3 |
-
WORKDIR /
|
4 |
|
5 |
-
|
|
|
|
|
6 |
|
7 |
-
RUN
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
|
9 |
COPY . .
|
10 |
|
|
|
|
|
11 |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
1 |
FROM python:3.9
|
2 |
|
3 |
+
WORKDIR /content
|
4 |
|
5 |
+
RUN adduser --disabled-password --gecos '' admin
|
6 |
+
RUN adduser admin sudo
|
7 |
+
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
8 |
|
9 |
+
RUN chown -R admin:admin /content
|
10 |
+
RUN chmod -R 777 /content
|
11 |
+
RUN chown -R admin:admin /home
|
12 |
+
RUN chmod -R 777 /home
|
13 |
+
|
14 |
+
USER admin
|
15 |
+
|
16 |
+
RUN mkdir /content/cache/
|
17 |
+
RUN export TRANSFORMERS_CACHE=/content/cache/
|
18 |
+
|
19 |
+
COPY ./requirements.txt /content/requirements.txt
|
20 |
+
|
21 |
+
RUN pip install --no-cache-dir --upgrade -r /content/requirements.txt
|
22 |
|
23 |
COPY . .
|
24 |
|
25 |
+
EXPOSE 7860
|
26 |
+
|
27 |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|