Spaces:
Paused
Paused
Update Dockerfile
#1
by SorovotPelo - opened
- Dockerfile +20 -19
Dockerfile
CHANGED
|
@@ -1,38 +1,39 @@
|
|
| 1 |
FROM ubuntu:20.04
|
| 2 |
-
|
| 3 |
USER root
|
| 4 |
|
| 5 |
-
ENV DEBIAN_FRONTEND
|
| 6 |
|
|
|
|
| 7 |
COPY . /app
|
| 8 |
|
|
|
|
| 9 |
RUN chmod -R 777 /app
|
| 10 |
-
RUN cd app
|
| 11 |
|
|
|
|
| 12 |
WORKDIR /app
|
| 13 |
|
| 14 |
-
#
|
| 15 |
-
RUN apt-get update -y
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
RUN python3 -m venv /app/venv
|
| 22 |
|
| 23 |
-
#
|
| 24 |
RUN /app/venv/bin/pip install -U pip
|
| 25 |
RUN /app/venv/bin/pip install watchdog uvicorn fastapi
|
| 26 |
|
| 27 |
-
#
|
| 28 |
-
COPY stream_videos.py /app/stream_videos.py
|
| 29 |
-
|
| 30 |
-
# t
|
| 31 |
RUN 7z x sv.tar -y
|
|
|
|
|
|
|
| 32 |
RUN chmod -R 777 /app
|
| 33 |
-
RUN chmod -R 777 hlds_linux
|
| 34 |
-
RUN ls && pwd
|
| 35 |
-
RUN ./hlds_linux
|
| 36 |
|
| 37 |
-
# Comando para ejecutar la aplicación
|
| 38 |
CMD ["/app/venv/bin/python", "/app/stream_videos.py"]
|
|
|
|
| 1 |
FROM ubuntu:20.04
|
|
|
|
| 2 |
USER root
|
| 3 |
|
| 4 |
+
ENV DEBIAN_FRONTEND=noninteractive
|
| 5 |
|
| 6 |
+
# Copia los archivos de la aplicación al directorio /app
|
| 7 |
COPY . /app
|
| 8 |
|
| 9 |
+
# Establece los permisos adecuados para todos los archivos en /app
|
| 10 |
RUN chmod -R 777 /app
|
|
|
|
| 11 |
|
| 12 |
+
# Establece /app como el directorio de trabajo
|
| 13 |
WORKDIR /app
|
| 14 |
|
| 15 |
+
# Actualiza los repositorios e instala dependencias necesarias
|
| 16 |
+
RUN apt-get update -y && apt-get install -y \
|
| 17 |
+
python3 \
|
| 18 |
+
python3-pip \
|
| 19 |
+
python3-venv \
|
| 20 |
+
p7zip-full \
|
| 21 |
+
wget \
|
| 22 |
+
lib32gcc-s1 \
|
| 23 |
+
lib32stdc++6
|
| 24 |
+
|
| 25 |
+
# Crea el entorno virtual para Python
|
| 26 |
RUN python3 -m venv /app/venv
|
| 27 |
|
| 28 |
+
# Actualiza pip e instala las dependencias de Python
|
| 29 |
RUN /app/venv/bin/pip install -U pip
|
| 30 |
RUN /app/venv/bin/pip install watchdog uvicorn fastapi
|
| 31 |
|
| 32 |
+
# Extrae el contenido de sv.tar
|
|
|
|
|
|
|
|
|
|
| 33 |
RUN 7z x sv.tar -y
|
| 34 |
+
|
| 35 |
+
# Establece permisos para los archivos necesarios
|
| 36 |
RUN chmod -R 777 /app
|
|
|
|
|
|
|
|
|
|
| 37 |
|
| 38 |
+
# Comando para ejecutar la aplicación, que inicia el servidor CS 1.6, playit y FastAPI
|
| 39 |
CMD ["/app/venv/bin/python", "/app/stream_videos.py"]
|