Created
June 13, 2018 16:46
-
-
Save shijieyao/b901a7f81e9920e8ed9ca79f456fe695 to your computer and use it in GitHub Desktop.
This file contains 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 | |
#To be used before srun so that interactive sessions are run with gpu support | |
#SBATCH -N 1 # nodes requested | |
#SBATCH -n 1 # tasks requested | |
#SBATCH --gres=gpu:1 | |
#SBATCH --mem=16000 # memory in Mb | |
#SBATCH -o gpu_outfile # send stdout to sample_experiment_outfile | |
#SBATCH -e gpu_errfile # send stderr to sample_experiment_errfile | |
#SBATCH -t 8:00:00 # time requested in hour:minute:second | |
export CUDA_HOME=/opt/cuda-8.0.44 | |
export CUDNN_HOME=/opt/cuDNN-6.0_8.0 | |
export STUDENT_ID=$(whoami) | |
export LD_LIBRARY_PATH=${CUDNN_HOME}/lib64:${CUDA_HOME}/lib64:$LD_LIBRARY_PATH | |
export LIBRARY_PATH=${CUDNN_HOME}/lib64:$LIBRARY_PATH | |
export CPATH=${CUDNN_HOME}/include:$CPATH | |
export PATH=${CUDA_HOME}/bin:${PATH} | |
export PYTHON_PATH=$PATH | |
mkdir -p /disk/scratch/${STUDENT_ID} | |
export TMPDIR=/disk/scratch/${STUDENT_ID}/ | |
export TMP=/disk/scratch/${STUDENT_ID}/ | |
# Activate the relevant virtual environment: | |
# source /home/${STUDENT_ID}/miniconda3/bin/activate tf_py2 | |
source venv/bin/activate | |
CUDA_VISIBLE_DEVICES=0 ./char30.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment