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 3 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
19 changes: 6 additions & 13 deletions docs/source/notebooks/temp-sense-gen/temp_sense_genCollab.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,16 @@
"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",
"!apt install qt5-default qttools5-dev libqt5xmlpatterns5-dev qtmultimedia5-dev libqt5multimediawidgets5 libqt5svg5-dev -y\n",
"!apt install ruby ruby-dev libz-dev python3-dev -y\n",
"!wget https://www.klayout.org/downloads/Ubuntu-20/klayout_0.28.3-1_amd64.deb\n",
Copy link
Collaborator

Choose a reason for hiding this comment

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

note: we have a package for klayout now too!
https://anaconda.org/LiteX-Hub/klayout/files

Copy link
Member

@msaligane msaligane Feb 4, 2023

Choose a reason for hiding this comment

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

@Jerry-lqx and @saicharan0112 can you update to use KLayout's conda package?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@Jerry-lqx can you remove those lines and add klayout below yosys please?

Copy link
Collaborator

Choose a reason for hiding this comment

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

If I edit the raw file directly, I am afraid that it might break the notebook

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I'll make the changes

"!dpkg -i klayout_0.28.3-1_amd64.deb\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.

"!bin/micromamba install --yes --prefix $CONDA_PREFIX \\\n",
" --channel litex-hub \\\n",
" --channel main \\\n",
Expand All @@ -142,10 +144,7 @@
" --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",
Expand All @@ -158,13 +157,7 @@
"!cp OpenFASOC/openfasoc/common/platforms/sky130hd/fill.json OpenFASOC/docs/source/notebooks/aux_files\n",
"\n",
"%env PDK_ROOT={CONDA_PREFIX}/share/pdk\n",
"%env OPENFASOC_ROOT={OPENFASOC_ROOT}\n",
"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()))"
"os.environ['PATH'] += \":/content/conda-env/bin\"\n"
]
},
{
Expand Down