#!/bin/bash


export MY_CONTAINER="lstm-test"
num=`docker ps -a|grep "$MY_CONTAINER"|wc -l`
echo $num
echo $MY_CONTAINER
if [ 0 -eq $num ];then
    docker run -it \
        --shm-size '64gb' \
        --name $MY_CONTAINER \
        -v [Your workspace that stores lstm dir]:/workspace \
        -v /usr/bin/cnmon:/usr/bin/cnmon \
        --net multi_node \
        --pid host \
        --privileged \
         yellow.hub.cambricon.com/pytorch/daily/x86_64/pytorch:v1.16.0-torch1.9-x86_64-ubuntu20.04-catch_1.9_develop_3.7-latest \
        /bin/bash
else
   docker start $MY_CONTAINER
   docker exec -it $MY_CONTAINER /bin/bash
fi

