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