This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(tf_cu90) $ source deactivate | |
$ echo $LD_LIBRARY_PATH | |
/usr/local/cuda-9.0/lib64:/usr/local/cuda-9.0/extras/CUPTI/lib64:/lib/nccl/cuda-9:/usr/lib64/openmpi/lib/: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir -p ~/anaconda3/envs/tf_cu90/etc/conda/deactivate.d | |
touch ~/anaconda3/envs/tf_cu90/etc/conda/deactivate.d/deactivate.sh | |
vim ~/anaconda3/envs/tf_cu90/etc/conda/deactivate.d/deactivate.sh | |
chmod +x ~/anaconda3/envs/tf_cu90/etc/conda/deactivate.d/deactivate.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
export LD_LIBRARY_PATH=$ORIGINAL_LD_LIBRARY_PATH | |
unset ORIGINAL_LD_LIBRARY_PATH |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat ~/anaconda3/envs/tensorflow_p27/etc/conda/activate.d/activate.sh | |
#!/bin/sh | |
export KERAS_BACKEND='tensorflow' | |
cp ~/.keras/keras_tensorflow.json ~/.keras/keras.json | |
export LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64:/usr/local/cuda-9.0/extras/CUPTI/lib64:/lib/nccl/cuda-9:$LD_LIBRARY_PATH_WITHOUT_CUDA |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat ~/anaconda3/envs/caffe_p27/etc/conda/activate.d/activate.sh | |
#!/bin/sh | |
export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64:/usr/local/cuda-8.0/extras/CUPTI/lib64:/lib/nccl/cuda-8:$LD_LIBRARY_PATH_WITHOUT_CUDA |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
GPU_TO_TRAIN=0,1,2,3,4,5,6,7 | |
BATCH_SIZE=960 | |
KVSTORE=dist_sync | |
source activate mxnet_p36 | |
python image-classification/train_imagenet.py \ | |
--gpu $GPU_TO_TRAIN --batch-size $BATCH_SIZE --num-epochs 10 \ | |
--data-nthreads 40 --disp-batches 20 \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import nltk | |
dwlr = nltk.downloader.Downloader() | |
for pkg in dwlr.packages(): | |
if pkg.subdir== 'tokenizers': | |
dwlr.download(pkg.id) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gcloud compute ssh $INSTANCE_NAME |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export IMAGE_FAMILY="tf-latest-gpu" # or put any required | |
export ZONE="us-west1-b" | |
export INSTANCE_NAME="my-instance" | |
export INSTANCE_TYPE="n1-standard-8" | |
gcloud compute instances create $INSTANCE_NAME \ | |
--zone=$ZONE \ | |
--image-family=$IMAGE_FAMILY \ | |
--image-project=deeplearning-platform-release \ | |
--maintenance-policy=TERMINATE \ | |
--accelerator='type=nvidia-tesla-v100,count=8' \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gcloud compute images describe-from-family tf-latest-gpu \ | |
--project deeplearning-platform-release |