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

Conversation

Jerry-lqx
Copy link
Contributor

fix outdated package dependencies, python version issue, and misleading PATH information

Remove PATH information that is misleading and remove the python version that confuses the google collab environment. Updated the version of dependencies
@msaligane
Copy link
Member

@proppy Do you understand why the notebook and python version are breaking?

"!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.

"!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

@proppy
Copy link
Collaborator

proppy commented Feb 3, 2023

@proppy Do you understand why the notebook and python version are breaking?

I think this is because some environment change in colab (see https://medium.com/google-colab/colab-updated-to-python-3-8-4922f9970a72)

we also had a similar issue in chipsalliance/silicon-notebooks#52 that we addressed with the following fix
https://github.com/chipsalliance/silicon-notebooks/pull/53/files.

We're also adding some testing in chipsalliance/silicon-notebooks#55 (feedback welcome!), which should make detecting those kind of issues earlier.

@Jerry-lqx
Copy link
Contributor Author

Jerry-lqx commented Feb 4, 2023

Update:

  1. I have placed echo python 3.7 and site_package_path at the beginning to set the python version and directory. It works fine now.

  2. I have added klayout's conda package.

I updated
LD_LIBRARY_PATH = os.environ.get('LD_LIBRARY_PATH', '')
%env LD_LIBRARY_PATH={LD_LIBRARY_PATH}:{CONDA_PREFIX}/lib to

%env LD_LIBRARY_PATH={LD_LIBRARY_PATH}:{CONDA_PREFIX}/lib/python3.7

Or simply, as in my previous notebook, all the path environment is replaced by

os.environ['PATH'] += ":/content/conda-env/bin"

This is how LDO generator attempted.

@msaligane msaligane merged commit 6ff4e06 into idea-fasoc:main Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants