UChicago-Computational-Content-Analysis / Frequently-Asked-Questions

0 stars 0 forks source link

Midway3 not able to install keras after activating cuda #20

Closed Qiuyu-Li closed 2 years ago

Qiuyu-Li commented 2 years ago

Hi,

I'm having issues with installing python packages on Midway3. This is what I did:

I followed #18 and ran:

sinteractive --account=soci40133 --partition=gpu --mem=100G --time=02:00:00 --gres=gpu:1 --cpus-per-task=4
module load python
module load cuda
source activate pytorch-gpu-1.2-cuda-10.0

Then, I ran pip install keras. And the terminal returned [ERROR 101] Network is unreachable.

I would appreciate it very much if anyone could provide any clues!

JunsolKim commented 2 years ago

Hi @Qiuyu-Li, an easy way to use Keras on RCC would be to use virtual environment that supports Tensorflow. Would you run source activate tf_keras in place of source activate pytorch-gpu-1.2-cuda-10.0 and try to import tensorflow.keras? (You don't have to manually install keras using pip in this case)

JunsolKim commented 2 years ago

Otherwise, you can try to load python module and install packages before starting sinteractive session as follows. (sinteractive session is not connected to internet)

module load python source activate pytorch-gpu-1.2-cuda-10.0 pip install keras sinteractive --account...

Qiuyu-Li commented 2 years ago

Dear Junsol, thank you so much! I used the second method and it worked!