jenniferzhou33 commited on
Commit
d4e5762
·
1 Parent(s): 35e8465
Files changed (2) hide show
  1. Dockerfile +2 -0
  2. 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'] = '/tmp/matplotlib_cache'
 
 
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