-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
60 lines (51 loc) · 3.46 KB
/
Copy pathDockerfile
File metadata and controls
60 lines (51 loc) · 3.46 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# ──────────────────────────────────────────────
# Imagen base: Python 3.11 slim
# ──────────────────────────────────────────────
FROM python:3.11-slim
# Metadatos
LABEL maintainer="v3"
LABEL description="Detección de logos con YOLOv8 y OpenCV"
# ──────────────────────────────────────────────
# Variables de entorno
# ──────────────────────────────────────────────
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
DEBIAN_FRONTEND=noninteractive
# ──────────────────────────────────────────────
# Dependencias del sistema necesarias para OpenCV
# ──────────────────────────────────────────────
RUN apt-get update && apt-get install -y --no-install-recommends \
libglib2.0-0 \
libgl1-mesa-glx \
libsm6 \
libxext6 \
libxrender-dev \
libgomp1 \
&& rm -rf /var/lib/apt/lists/*
# ──────────────────────────────────────────────
# Directorio de trabajo
# ──────────────────────────────────────────────
WORKDIR /app
# ──────────────────────────────────────────────
# Instalar dependencias Python
# ──────────────────────────────────────────────
COPY requirements.txt .
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
# ──────────────────────────────────────────────
# Copiar código fuente
# ──────────────────────────────────────────────
COPY src/ ./src/
COPY models/ ./models/
# ──────────────────────────────────────────────
# Crear carpetas necesarias
# ──────────────────────────────────────────────
RUN mkdir -p data outputs database
# ──────────────────────────────────────────────
# Volúmenes para datos y resultados
# ──────────────────────────────────────────────
VOLUME ["/app/data", "/app/outputs", "/app/database"]
# ──────────────────────────────────────────────
# Comando por defecto
# ──────────────────────────────────────────────
CMD ["python", "src/v3_inference.py", "--help"]