Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +16 -2
Dockerfile
CHANGED
|
@@ -7,16 +7,30 @@ RUN apt-get update && apt-get install -y \
|
|
| 7 |
libgl1-mesa-glx \
|
| 8 |
fonts-liberation \
|
| 9 |
fontconfig \
|
|
|
|
| 10 |
&& rm -rf /var/lib/apt/lists/*
|
| 11 |
|
| 12 |
# Configurar diret贸rios e permiss玫es para fontconfig e matplotlib
|
| 13 |
RUN mkdir -p /usr/share/fonts/truetype/liberation && \
|
| 14 |
mkdir -p /root/.cache/matplotlib && \
|
| 15 |
mkdir -p /root/.config/fontconfig && \
|
|
|
|
| 16 |
chmod -R 777 /root/.cache/matplotlib && \
|
| 17 |
-
chmod -R 777 /root/.config/fontconfig
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
# Configurar diret贸rio de trabalho
|
| 20 |
WORKDIR /code
|
| 21 |
|
| 22 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
libgl1-mesa-glx \
|
| 8 |
fonts-liberation \
|
| 9 |
fontconfig \
|
| 10 |
+
poppler-utils \
|
| 11 |
&& rm -rf /var/lib/apt/lists/*
|
| 12 |
|
| 13 |
# Configurar diret贸rios e permiss玫es para fontconfig e matplotlib
|
| 14 |
RUN mkdir -p /usr/share/fonts/truetype/liberation && \
|
| 15 |
mkdir -p /root/.cache/matplotlib && \
|
| 16 |
mkdir -p /root/.config/fontconfig && \
|
| 17 |
+
mkdir -p /root/.config/matplotlib && \
|
| 18 |
chmod -R 777 /root/.cache/matplotlib && \
|
| 19 |
+
chmod -R 777 /root/.config/fontconfig && \
|
| 20 |
+
chmod -R 777 /root/.config/matplotlib
|
| 21 |
+
|
| 22 |
+
# Configurar vari谩vel de ambiente para o matplotlib
|
| 23 |
+
ENV MPLCONFIGDIR=/root/.config/matplotlib
|
| 24 |
|
| 25 |
# Configurar diret贸rio de trabalho
|
| 26 |
WORKDIR /code
|
| 27 |
|
| 28 |
+
# Copiar requirements e instalar depend锚ncias Python
|
| 29 |
+
COPY requirements.txt .
|
| 30 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 31 |
+
|
| 32 |
+
# Copiar o c贸digo da aplica莽茫o
|
| 33 |
+
COPY app.py .
|
| 34 |
+
|
| 35 |
+
# Comando para iniciar a aplica莽茫o
|
| 36 |
+
CMD ["python", "app.py"]
|