-
Notifications
You must be signed in to change notification settings - Fork 572
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
CUDA 11 environment installation config? #20
Comments
Dear lmmx, Thank you for your interest in our work. Would you mind trying our colab? In colab, the CUDA Version is 11.2, so I dont think there is a problem to use CUDA 11. Would you mind trying the setting we use in colab? By the way, we update the code a bit, maybe use the new version of the code. Best Wishes, Alex |
I looked more closely, specifically at the version of TensorFlow (the tensorflow Click to show installation with CUDA 11 and Python 3.7
conda create -y -n styleclip10
conda activate styleclip10
conda install "cudatoolkit>=11,<11.2" -c pytorch
conda install -y "python<3.8" -c conda-forge # Python 3.7.10 (restricted by TensorFlow 1.x dependency)
pip install tensorflow-gpu==1.15.2
pip install torch==1.7.1+cu110 torchvision==0.8.2+cu110 -f https://download.pytorch.org/whl/torch_stable.html
pip install git+https://github.com/openai/CLIP.git # forces pytorch 1.7.1 install
pip install pandas requests opencv-python matplotlib scikit-learn gdown
gdown https://drive.google.com/u/0/uc?id=1EM87UquaoQmk17Q8d5kYIAHqu0dkYqdT&export=download
git clone https://github.com/omertov/encoder4editing.git
cd global
python GetCode.py --code_type "w" ... running this gave errors about missing I ran As far as I know, the only way to run TensorFlow for CUDA 11 is
This changes the installation to: conda create -y -n styleclip11
conda activate styleclip11
conda install -y "python<3.7" -c conda-forge # Python 3.6.13 (restricted by TensorFlow 1.x dependency)
pip install nvidia-pyindex
pip install nvidia-tensorflow==1.15.2 # only available for Python 3.6, replaces tensorflow-gpu==1.15.2
pip install nvidia-tensorboard
conda install "cudatoolkit>=11,<11.2" -c pytorch # 11.0.221
pip install torch==1.7.1+cu110 torchvision==0.8.2+cu110 -f https://download.pytorch.org/whl/torch_stable.html
pip install git+https://github.com/openai/CLIP.git # forces pytorch 1.7.1 install
pip install pandas requests opencv-python matplotlib scikit-learn gdown
gdown https://drive.google.com/u/0/uc?id=1EM87UquaoQmk17Q8d5kYIAHqu0dkYqdT&export=download
git clone https://github.com/omertov/encoder4editing.git
cd global
python GetCode.py --code_type "w" With this replacement for TensorFlow, the GPU successfully registered, however it still didn't succeed. I received an error from cuBLAS, Long story short, this is the installation to get a working StyleCLIP setup for CUDA 11! conda create -y -n styleclip12
conda activate styleclip12
conda install -y "python<3.7" -c conda-forge # Python 3.6.13 (restricted by TensorFlow 1.x dependency)
pip install nvidia-pyindex
pip install nvidia-tensorflow==1.15.4 # only available for Python 3.6, replaces tensorflow-gpu==1.15.2
conda install -y "cudatoolkit>=11,<11.2" -c pytorch # 11.0.221
pip install torch==1.7.1+cu110 torchvision==0.8.2+cu110 -f https://download.pytorch.org/whl/torch_stable.html
pip install git+https://github.com/openai/CLIP.git # forces pytorch 1.7.1 install
pip install pandas requests opencv-python matplotlib scikit-learn gdown
gdown https://drive.google.com/u/0/uc?id=1EM87UquaoQmk17Q8d5kYIAHqu0dkYqdT&export=download
git clone https://github.com/omertov/encoder4editing.git
cd global
python GetCode.py --code_type "w"
Only took a dozen attempts 😅 Sorry for the overly detailed report, just wanted to explain how I arrived at this setup 😺 |
I also have troubles running The setup throws some warnings but has completed without exception. Setup code
But
Error
I tried
instead of Setup warnings
And another error in `GetCode.py` error
Do you have any idea how to fix this? |
It looks like |
Thanks for your solution and explanation. I have tried your recommended instruction for installing the tensorflow on RTX3090, now the tensorflow recognizes the GPU but when trying to run the GetCode.py, I get the following error: |
Hey there, been having some trouble installing on RTX 30 series (which require CUDA 11), and was hoping I could get some tips on how to get it working (either from the developers or other users who've encountered the same problem?)
Not sure if this is being run on a CUDA 11 environment in your group at present (if so please let me know what I've missed!), I've not been able to run the
global/
subdirectory code, beginning withGetCode.py
on either Python 3.6 or 3.7 (while 3.8 and above are incompatible, they require TensorFlow 2.2).I installed via conda as the pip installed TensorFlow was built against CUDA 10, and raised errors about missing
*.so.10
libraries as a result, which disappeared when using the conda-forge package.After getting an error that "Setting up TensorFlow plugin "fused_bias_act.cu": Failed!" I tried some advice on an NVIDIA forum post for StyleGAN2, to change line 135 of
global/dnnlib/tflib/custom_ops.py
toHowever this had no effect: there still seems to be a failure to register the GPU.
To check whether I can use the environment I'm running
StyleCLIP/global $ python GetCode.py --code_type "w"
My environment setups (3.6 and 3.7 respectively) are as follows (after each is the error output for that environment)
Click to show setup for Python 3.6, CUDA 11.0.221, PyTorch 1.7.1, TensorFlow 1.14.0
Gives:
Click to show setup for Python 3.7, CUDA 11.0.221, PyTorch 1.7.1, TensorFlow 1.14.0
Requiring packages come from the anaconda channel instead for some reason is enforcing TensorFlow 1.10.0, which (once you get past some interface changes) still leads to the same GPU registration problem.
Click to show setup for Python 3.6, CUDA 11.0.221, PyTorch 1.7.1, TensorFlow 1.10.0 (anaconda channel)
CUDA can also be downloaded from conda-forge but upon installing pytorch, the package is superseded by the higher-priority cudatoolkit package in that channel (making it equivalent to the attempt above which failed)
I'm out of ideas so giving up at this point, please let me know if there's a solution!
The text was updated successfully, but these errors were encountered: