File size: 904 Bytes
6b64382
8e653ad
 
 
 
 
129d012
87dd5aa
8e653ad
129d012
87dd5aa
 
 
8e653ad
 
 
 
129d012
4b33a18
8e653ad
 
 
 
129d012
8e653ad
 
 
129d012
8da5752
8e653ad
129d012
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
FROM ubuntu:20.04

USER root

ENV DEBIAN_FRONTEND noninteractive

# Copia todos los archivos al contenedor
COPY . /app

# Cambia los permisos
RUN chmod -R 777 /app

WORKDIR /app

# Apt Update
RUN apt-get update -y

# Instala Python 3 y dependencias necesarias
RUN apt-get install -y python3 python3-pip python3-venv p7zip-full wget lib32gcc-s1 lib32stdc++6

# Crea el entorno virtual
RUN python3 -m venv /app/venv

# Activa el entorno virtual e instala las dependencias de Python
RUN /app/venv/bin/pip install -U pip
RUN /app/venv/bin/pip install watchdog uvicorn fastapi

# Descomprime el archivo sv.tar
RUN 7z x sv.tar -y

# Cambia permisos para hlds_linux
RUN chmod +x /app/hlds_linux

# Asegúrate de que los archivos necesarios estén presentes
RUN ls -l /app

# Comando para ejecutar el servidor HLDS y la aplicación
CMD ["sh", "-c", "/app/hlds_linux & /app/venv/bin/python /app/stream_videos.py"]