Install for development
For development purpose, you might want to clone the repo and install the cloned local package. This is known as "linking":
This will place a link between the installed packages and this local
directory. Everytime this local code is modified, the update is immediately
available for the package
For demo purpose, it is desired to setup BHDL on a server, so that users can just login to the server and run BHDL directly without the hassle of installation. Also, the auto-placement engine requires GPU to run efficiently, which may not be available for users' own machines. This section describes the general process to setup a jupyterhub server capable of running BHDL.
This section mostly follows the official jupyterhub guide. It is simplied a little (removed the conda part) and noted here for quick reference.
Create a virtual environment for jupyterhub:
Install some packages. Note that if you want install any future packages for jupyterhub server, like an extension, you must use this executable and install it globally.
Some nodejs dependencies:
change one config in
Add system service so that it can be started as a daemon and auto-start on boot:
the service file content:
enable and start it:
The default port is
8000, and it seems also to use
8001. Chaning 8000 in
configuration does not change 8001, which in turns seems to make it unable to
start two instances of jupyterhub easily.
Start placement engine (and this will listen on port 8082 and shared for all users):
Users probably should set up their own libraries in their home directory, because the easyeda library is written to disk if not available locally, thus users need write access to the library.