Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated temp_sense_genCollab.ipynb #177

Merged
merged 8 commits into from
Feb 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 7 additions & 10 deletions docs/source/notebooks/temp-sense-gen/temp_sense_genCollab.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -122,31 +122,30 @@
"import pathlib\n",
"import sys\n",
"\n",
"!apt-get install -y ruby-full time build-essential\n",
"!apt install -f libqt4-designer libqt4-xml libqt4-sql libqt4-network libqtcore4 libqtgui4\n",
"!apt install -y time build-essential\n",
"!curl -Ls https://micro.mamba.pm/api/micromamba/linux-64/latest | tar -xvj bin/micromamba\n",
"conda_prefix_path = pathlib.Path('conda-env')\n",
"CONDA_PREFIX = str(conda_prefix_path.resolve())\n",
"%env CONDA_PREFIX={CONDA_PREFIX}\n",
"!bin/micromamba create --yes --prefix $CONDA_PREFIX\n",
"!echo 'python ==3.7*' >> {CONDA_PREFIX}/conda-meta/pinned\n",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it'd say that it is necessary to pin the python version in the environment because conda-eda only support 3.7 for now:
hdl/conda-eda#260

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oay, so that means 3.7 is fine for now? How do we make sure this is automatically updated?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I executed the notebook, even if I pin python 3.7, it still used python3.8 directory for some reason. But, when I remove the pin, the notebook runs smoothly. I'll check the notebook again.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the problem is not on this "echo python ==3.7". The problem is some of the PATH information at the end of the code cell. I currently testing the line that caused the problem specifically.

"site_package_path = conda_prefix_path / 'lib/python3.7/site-packages'\n",
"sys.path.append(str(site_package_path.resolve()))\n",
"!bin/micromamba create --yes --prefix $CONDA_PREFIX\n",
"!bin/micromamba install --yes --prefix $CONDA_PREFIX \\\n",
" --channel litex-hub \\\n",
" --channel main \\\n",
" open_pdks.sky130a \\\n",
" magic \\\n",
" netgen \\\n",
" openroad \\\n",
" yosys\n",
" yosys \\\n",
" klayout \n",
"!bin/micromamba install --yes --prefix $CONDA_PREFIX \\\n",
" --channel conda-forge \\\n",
" svgutils ngspice\n",
"\n",
"!wget https://www.klayout.org/downloads/Ubuntu-18/klayout_0.27.11-1_amd64.deb\n",
"!dpkg -i klayout_0.27.11-1_amd64.deb\n",
"!python -m pip install pyyaml click gdstk --no-binary gdstk\n",
"PATH = os.environ['PATH']\n",
"\n",
"# clone OpenFASOC repo\n",
"!git clone https://github.com/idea-fasoc/OpenFASOC\n",
"# setup env\n",
Expand All @@ -162,9 +161,7 @@
"PATH = os.environ['PATH']\n",
"%env PATH={PATH}:{CONDA_PREFIX}/bin:{OPENFASOC_ROOT}:{OPENFASOC_ROOT}/openfasoc/generators/temp-sense-gen/tools\n",
"LD_LIBRARY_PATH = os.environ.get('LD_LIBRARY_PATH', '')\n",
"%env LD_LIBRARY_PATH={LD_LIBRARY_PATH}:{CONDA_PREFIX}/lib\n",
"site_package_path = conda_prefix_path / 'lib/python3.7/site-packages'\n",
"sys.path.append(str(site_package_path.resolve()))"
"%env LD_LIBRARY_PATH={LD_LIBRARY_PATH}:{CONDA_PREFIX}/lib/python3.7\n"
]
},
{
Expand Down