Spaces:
Sleeping
Sleeping
Commit ·
d4e5762
1
Parent(s): 35e8465
font
Browse files- Dockerfile +2 -0
- codes/utils.py +3 -1
Dockerfile
CHANGED
|
@@ -16,6 +16,8 @@ COPY requirements.txt /tmp/
|
|
| 16 |
RUN pip install -r /tmp/requirements.txt
|
| 17 |
RUN pip install rpy2==3.5.11
|
| 18 |
ENV MPLCONFIGDIR /tmp/matplotlib_cache
|
|
|
|
|
|
|
| 19 |
ENV FONTCONFIG_CACHE /tmp/fontconfig-cache
|
| 20 |
|
| 21 |
# Install R packages
|
|
|
|
| 16 |
RUN pip install -r /tmp/requirements.txt
|
| 17 |
RUN pip install rpy2==3.5.11
|
| 18 |
ENV MPLCONFIGDIR /tmp/matplotlib_cache
|
| 19 |
+
|
| 20 |
+
RUN mkdir -p /tmp/fontconfig-cache && chmod -R 777 /tmp/fontconfig-cache
|
| 21 |
ENV FONTCONFIG_CACHE /tmp/fontconfig-cache
|
| 22 |
|
| 23 |
# Install R packages
|
codes/utils.py
CHANGED
|
@@ -5,7 +5,9 @@ import os
|
|
| 5 |
import pickle
|
| 6 |
from matplotlib.patches import Patch
|
| 7 |
#from rpy2.robjects import conversion, default_converter
|
| 8 |
-
os.environ['MPLCONFIGDIR'] =
|
|
|
|
|
|
|
| 9 |
|
| 10 |
import matplotlib.pyplot as plt
|
| 11 |
import numpy as np
|
|
|
|
| 5 |
import pickle
|
| 6 |
from matplotlib.patches import Patch
|
| 7 |
#from rpy2.robjects import conversion, default_converter
|
| 8 |
+
os.environ['MPLCONFIGDIR'] =
|
| 9 |
+
os.environ['FONTCONFIG_CACHE'] = '/tmp/fontconfig-cache'
|
| 10 |
+
|
| 11 |
|
| 12 |
import matplotlib.pyplot as plt
|
| 13 |
import numpy as np
|