-
Notifications
You must be signed in to change notification settings - Fork 64
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
NixOS compatibility (via nix-shell) #36
base: main
Are you sure you want to change the base?
Conversation
Hello @deftdawg, Thanks for your PR and your interest in the project. I will need some time to review your code and make some tests. I can already say you that the use of torch==2.2.0 will break audiocraft-based modules, and it is not an option. Same for the update of numpy to 1.26.4 : bad idea ... Thanks again |
No worries, I bumped numpy to 1.26.4 because my install was defaulting to Python 3.12, eventually I had to downgrade to 3.11, I'll see about reverting that when I have another go to see if I can get RoCM running. Leave it open til I get a chance to work on it some more (or cherry pick parts of it). All good 😀 |
Python 3.12 won't work with torch==2.1.0 :( ... (at least not on systems i've deployed biniou).
Of course ! I'll be really happy to merge your PR if we can find a way to make it work efficiently ! And you can take your time, as I've very few time to work on biniou these days ... |
…e with NixOS - create shell.nix build environment for NixOS - Skip cert generation if private key already exists - Add instructions to build and run in a Nix shell (NixOS)
Thanks for your modifications. I'll watch it asap, but be patient : there's a lot of things I want to test before merging your pull request. |
No worries, I'm still poking away at it gonna try to get RoCM going and maybe intel arc since I have those 2 GPUs on hand |
@@ -12,17 +12,18 @@ mkdir -p ./ssl | |||
mkdir -p ./models/Audiocraft | |||
|
|||
## Creating self-signed certificate | |||
openssl req -x509 -newkey rsa:4096 -keyout ./ssl/key.pem -out ./ssl/cert.pem -sha256 -days 3650 -nodes -subj "/C=FR/ST=Paris/L=Paris/O=Biniou/OU=/CN=" | |||
[ ! -e ./ssl/key.pem ] && openssl req -x509 -newkey rsa:4096 -keyout ./ssl/key.pem -out ./ssl/cert.pem -sha256 -days 3650 -nodes -subj "/C=FR/ST=Paris/L=Paris/O=Biniou/OU=/CN=" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for not seeing it before : don't do that. There's zero reasons for this certificate to exist, as this is script is not handling at all an existing installation.
|
||
## Creating virtual environment | ||
eval $PYTHON_VER -m venv ./env | ||
source ./env/bin/activate | ||
|
||
## Install packages : | ||
set -e # stop if any command below fails |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't do that : warnings in the installation of some components sometimes gives useful hints for debugging. Blame is on my installer, that should handle correctly failures.
pip install -r requirements.txt | ||
FORCE_CMAKE=1 pip install llama-cpp-python |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See following comment.
pip install -r requirements.txt | ||
FORCE_CMAKE=1 pip install llama-cpp-python | ||
# pip install torch==2.1.0 torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely don't do that !
Installation order is important. I don't want it to be changed.
Also, torch==2.1.0 is mandatory and should be forced. Don't comment it, please.
If all the changes you made in install.sh (except for the shebang) have a real interest for NixOS, please provide a specific install_nix.sh and update documentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to be tested, but Ok for that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to be tested, but Ok for that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to be tested, but Ok for that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to be tested, but Ok for that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to be tested, but Ok for that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to be tested and rebased, but Ok for that.
Very nice work by the way ! :)
It runs as it is...
To do: