Spaces:
Sleeping
Sleeping
Bartolomé Ortiz commited on
Commit ·
c112366
1
Parent(s): 271bc40
add figures with Git LFS
Browse files- 2APP.PY → app.py +0 -0
- data/moths_combined.csv +0 -0
- dockerfile +21 -3
- images/logo1.png +3 -0
- images/logo2.png +3 -0
2APP.PY → app.py
RENAMED
|
File without changes
|
data/moths_combined.csv
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
dockerfile
CHANGED
|
@@ -1,7 +1,25 @@
|
|
|
|
|
| 1 |
FROM python:3.11-slim
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
WORKDIR /app
|
|
|
|
|
|
|
| 3 |
COPY requirements.txt .
|
| 4 |
-
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
|
|
|
| 5 |
COPY . .
|
| 6 |
-
|
| 7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Imagen base ligera de Python
|
| 2 |
FROM python:3.11-slim
|
| 3 |
+
|
| 4 |
+
# Variables de entorno para evitar caché y mejorar logging
|
| 5 |
+
ENV PYTHONDONTWRITEBYTECODE=1 \
|
| 6 |
+
PYTHONUNBUFFERED=1 \
|
| 7 |
+
PIP_NO_CACHE_DIR=1
|
| 8 |
+
|
| 9 |
+
# Directorio de trabajo
|
| 10 |
WORKDIR /app
|
| 11 |
+
|
| 12 |
+
# Instala dependencias
|
| 13 |
COPY requirements.txt .
|
| 14 |
+
RUN pip install --no-cache-dir -r requirements.txt gunicorn
|
| 15 |
+
|
| 16 |
+
# Copia el resto de archivos de la app
|
| 17 |
COPY . .
|
| 18 |
+
|
| 19 |
+
# Hugging Face Spaces expone PORT=7860 (o el que defina el entorno)
|
| 20 |
+
ENV PORT=7860
|
| 21 |
+
EXPOSE 7860
|
| 22 |
+
|
| 23 |
+
# Lanza la app con Gunicorn
|
| 24 |
+
# Nota: cambia "2APP" si el archivo se llama distinto (sin .py)
|
| 25 |
+
CMD gunicorn 2APP:server -b 0.0.0.0:${PORT} --workers 2 --threads 4 --timeout 120
|
images/logo1.png
ADDED
|
Git LFS Details
|
images/logo2.png
ADDED
|
Git LFS Details
|