Offline installation - cmusatyalab/hawk GitHub Wiki
This isn't really a Hawk issue and has more to do with the Poetry development environment.
Some of the following notes are taking from the following Poetry issue tracker discussion.
Some of the steps mentioned here have been tested because hawk_deploy uses Python wheels
to deploy scouts to servers. But as we have had no need to install in a completely offline
environment ourselves some of the suggestions here are purely speculative.
Collecting Python wheels for all dependencies
The following commands on a network connected system will download the Python packages that Hawk depends on. You do have to take care to run this with the same python version as you will be using in the off-line system or it may pull the wrong python wheels.
mkdir packages
poetry export -E home -E scout > requirements.txt
poetry run pip download -r requirements.txt -d packages/
Install Hawk using a Python wheel
You can build a pip installable wheel for Hawk itself and then handle the virtualenv and pip installation as follows.
poetry build
cp dist/cmuhawk-*.whl packages/
pip install --no-index --find-links packages/ cmuhawk[home,scout]
Alternative: editable install from Hawk source tree
It may also be possible to do an editable pip install, in which case we don't
need to use poetry to build a wheel although we may need to pull down an extra
poetry-core dependency.
# on the connected system download the additional poetry-core package
poetry run pip download -d packages/ poetry-core
# on the offline system
pip install --no-index --find-links packages/ -e '.[home,scout]'