Spaces:
Sleeping
Sleeping
Create Dockerfile
Browse files- Dockerfile +21 -0
Dockerfile
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.9-slim
|
| 2 |
+
|
| 3 |
+
# Instalar depend锚ncias do sistema
|
| 4 |
+
RUN apt-get update && apt-get install -y \
|
| 5 |
+
ghostscript \
|
| 6 |
+
python3-opencv \
|
| 7 |
+
libgl1-mesa-glx \
|
| 8 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 9 |
+
|
| 10 |
+
# Configurar diret贸rio de trabalho
|
| 11 |
+
WORKDIR /code
|
| 12 |
+
|
| 13 |
+
# Copiar requirements e instalar depend锚ncias Python
|
| 14 |
+
COPY requirements.txt .
|
| 15 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 16 |
+
|
| 17 |
+
# Copiar o c贸digo da aplica莽茫o
|
| 18 |
+
COPY app.py .
|
| 19 |
+
|
| 20 |
+
# Comando para iniciar a aplica莽茫o
|
| 21 |
+
CMD ["python", "app.py"]
|