File size: 775 Bytes
034ca9b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
FROM python:3.10-slim

# Evitar buffers en logs y habilitar salida limpia
ENV PYTHONUNBUFFERED=1 \
    PYTHONDONTWRITEBYTECODE=1 \
    PORT=7860

WORKDIR /app

# Instalar dependencias del sistema si fueran necesarias
RUN apt-get update && apt-get install -y --no-install-recommends \

    gcc \
    && rm -rf /var/lib/apt/lists/*

# Copiar requirements e instalarlos
COPY requirements*.txt docker/requirements*.txt ./
RUN if [ -f requirements.txt ]; then pip install --no-cache-dir -r requirements.txt; else pip install --no-cache-dir -r docker/requirements.txt; fi

# Copiar el código del proyecto
COPY . .

# Puerto por defecto de Hugging Face Spaces
EXPOSE 7860

# Comando para arrancar el bot y el servidor fantasma
CMD ["python", "src/bot.py"]