Spaces:
Running
Running
FROM debian:stable | |
USER root | |
ENV DEBIAN_FRONTEND noninteractive | |
COPY . /app | |
RUN chmod -R 777 /app | |
WORKDIR /app | |
# Instala Python 3 | |
RUN apt-get update && apt-get install -y python3 | |
# Instala pip | |
RUN apt-get update && apt-get install -y python3-pip | |
# Instala venv | |
RUN apt-get update && apt-get install -y python3-venv | |
# Crea el entorno virtual | |
RUN python3 -m venv /app/venv | |
# Activa el entorno virtual | |
RUN /app/venv/bin/pip install -U pip | |
RUN /app/venv/bin/pip install watchdog uvicorn fastapi | |
# Copia el archivo stream_videos.py | |
COPY stream_videos.py /app/stream_videos.py | |
# Comando para ejecutar la aplicación | |
CMD ["/app/venv/bin/python", "/app/stream_videos.py"] |