sc16w / Dockerfile
SorovotPelo's picture
Update Dockerfile
129d012 verified
raw
history blame contribute delete
904 Bytes
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"]