Skip to content

Commit

Permalink
[fix] Add matplotlib as dependency and initial import
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanHCenalmor committed Sep 3, 2024
1 parent b12de21 commit 38b6d3e
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 10 deletions.
3 changes: 2 additions & 1 deletion .tools/actions_utils/environment.gpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ dependencies:
- nvidia-cudnn-cu11==8.6.0.163 # if GPU_FLAG==1
- nbformat
- jupyterlab
- ipywidgets
- ipywidgets
- matplotlib
1 change: 1 addition & 0 deletions .tools/notebook_autoconversion/code_utils_one_cell.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

ipywidget_imported_code = ("import ipywidgets as widgets\n"
"from IPython.display import Markdown, display, clear_output\n"
"from matplotlib import pyplot as plt\n"
"import yaml as yaml_library\n"
"import os\n"
"\n"
Expand Down
15 changes: 9 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -107,16 +107,19 @@ RUN pip install --upgrade pip && \
fi && \
if [ "$(printf '%s\n' "3.7" "${PYTHON_VERSION}" | sort -V | head -n1)" = "3.7" ] ; then \
# For Python between 3.7 and 3.11
pip install ipywidgets==8.1.0 && \
pip install jupyterlab==3.6.0 ; \
pip install ipywidgets==8.1.0 && \
pip install jupyterlab==3.6.0 && \
pip install matplotlib==3.6.3 ; \
elif [ "$(printf '%s\n' "3.5" "${PYTHON_VERSION}" | sort -V | head -n1)" = "3.5" ] ; then \
# For Python 3.4 or lower
pip install ipywidgets==7.8.1 && \
pip install jupyterlab==0.23.0 ; \
pip install ipywidgets==7.8.1 && \
pip install jupyterlab==0.23.0 && \
pip install matplotlib==2.1.0 ; \
else \
# For Python 3.5 and 3.6
pip install ipywidgets==8.0.0a0 && \
pip install jupyterlab==2.3.2 ; \
pip install ipywidgets==8.0.0a0 && \
pip install jupyterlab==2.3.2 && \
pip install matplotlib==3.0.3 ; \
fi

# Custom cache invalidation
Expand Down
9 changes: 6 additions & 3 deletions Dockerfile.gpu
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,18 @@ RUN pip install --upgrade pip && \
if [ "$(printf '%s\n' "3.7" "${PYTHON_VERSION}" | sort -V | head -n1)" = "3.7" ] ; then \
# For Python between 3.7 and 3.11
pip install ipywidgets==8.1.0 && \
pip install jupyterlab==3.6.0 ; \
pip install jupyterlab==3.6.0 && \
pip install matplotlib==3.6.3 ; \
elif [ "$(printf '%s\n' "3.5" "${PYTHON_VERSION}" | sort -V | head -n1)" = "3.5" ] ; then \
# For Python 3.4 or lower
pip install ipywidgets==7.8.1 && \
pip install jupyterlab==0.23.0 ; \
pip install jupyterlab==0.23.0 && \
pip install matplotlib==2.1.0 ; \
else \
# For Python 3.5 and 3.6
pip install ipywidgets==8.0.0a0 && \
pip install jupyterlab==2.3.2 ; \
pip install jupyterlab==2.3.2 && \
pip install matplotlib==3.0.3 ; \
fi

# Custom cache invalidation
Expand Down

0 comments on commit 38b6d3e

Please sign in to comment.