File tree Expand file tree Collapse file tree 4 files changed +10
-6
lines changed Expand file tree Collapse file tree 4 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -30,8 +30,8 @@ RUN curl -o Miniconda3-latest-Linux-x86_64.sh https://repo.continuum.io/minicond
3030 && ./Miniconda3-latest-Linux-x86_64.sh -b -p "${MINICONDA_HOME}" \
3131&& rm Miniconda3-latest-Linux-x86_64.sh
3232COPY conda.txt conda.txt
33- RUN conda install -y --file=conda.txt
34- RUN conda clean -y -i -l -p -t && \
33+ RUN conda install -y --file=conda.txt && \
34+ conda clean -y -i -l -p -t && \
3535 rm -f conda.txt
3636COPY pip.txt pip.txt
3737RUN pip install -r pip.txt && \
Original file line number Diff line number Diff line change 1- numpy
1+ numpy==1.15.3
Original file line number Diff line number Diff line change @@ -351,7 +351,11 @@ def targetshape(content, size=None):
351351
352352def gpuname ():
353353 """Returns the model name of the first available GPU"""
354- gpus = GPUtil .getGPUs ()
354+ try :
355+ gpus = GPUtil .getGPUs ()
356+ except :
357+ LOGGER .warning ("Unable to detect GPU model. Is your GPU configured? Are you running with nvidia-docker?" )
358+ return "UNKNOWN"
355359 if len (gpus ) == 0 :
356360 raise ValueError ("No GPUs detected in the system" )
357361 return gpus [0 ].name
@@ -365,6 +369,6 @@ def maxtile(alg="gatys"):
365369 """
366370 gname = gpuname ()
367371 if gname not in GPUCONFIG :
368- LOGGER .warning ("Unknown GPU model %s , will use default tiling parameters" )
372+ LOGGER .warning (f "Unknown GPU model { gname } , will use default tiling parameters" )
369373 gname = "default"
370374 return GPUCONFIG [gname ][alg ]
Original file line number Diff line number Diff line change 1- gputil
1+ gputil==1.3.0
You can’t perform that action at this time.
0 commit comments