Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +10 -19
Dockerfile
CHANGED
|
@@ -4,29 +4,20 @@ USER root
|
|
| 4 |
|
| 5 |
ENV DEBIAN_FRONTEND noninteractive
|
| 6 |
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
python3 \
|
| 12 |
-
python3-pip \
|
| 13 |
-
python3-venv \
|
| 14 |
-
libnginx-mod-rtmp
|
| 15 |
-
|
| 16 |
-
# Configuraci贸n del trabajo
|
| 17 |
WORKDIR /app
|
| 18 |
|
| 19 |
-
|
| 20 |
|
| 21 |
-
# Instalaci贸n de paquetes Python
|
| 22 |
RUN python3 -m venv /app/venv
|
| 23 |
-
RUN /app/venv/bin/pip install watchdog uvicorn fastapi
|
| 24 |
|
| 25 |
-
|
| 26 |
-
|
|
|
|
| 27 |
|
| 28 |
-
|
| 29 |
-
COPY nginx.conf /etc/nginx/nginx.conf
|
| 30 |
|
| 31 |
-
|
| 32 |
-
CMD service nginx start && /app/venv/bin/python /app/stream_videos.py
|
|
|
|
| 4 |
|
| 5 |
ENV DEBIAN_FRONTEND noninteractive
|
| 6 |
|
| 7 |
+
COPY . /app
|
| 8 |
+
|
| 9 |
+
RUN chmod -R 777 /app
|
| 10 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
WORKDIR /app
|
| 12 |
|
| 13 |
+
RUN apt-get update && apt-get install -y ffmpeg python3 python3-pip python3-venv
|
| 14 |
|
|
|
|
| 15 |
RUN python3 -m venv /app/venv
|
|
|
|
| 16 |
|
| 17 |
+
RUN /app/venv/bin/pip install watchdog
|
| 18 |
+
RUN /app/venv/bin/pip install uvicorn
|
| 19 |
+
RUN /app/venv/bin/pip install fastapi
|
| 20 |
|
| 21 |
+
COPY stream_videos.py /app/stream_videos.py
|
|
|
|
| 22 |
|
| 23 |
+
CMD ["/app/venv/bin/python", "/app/stream_videos.py"]
|
|
|