Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

Commit

Permalink
synchronise with the commit fd5ea7a
Browse files Browse the repository at this point in the history
  • Loading branch information
swangcs committed Aug 11, 2020
1 parent f0d44a0 commit 7d3d349
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion docker-cmd-mac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ GROUP_ID=""
COMMAND=""
EXP=""
DETACH=false
SHM_SIZE="10g"

function print_help {
echo "Parameters:"
Expand All @@ -44,6 +45,7 @@ function print_help {
echo " LEARNING dir \"$LEARN_DIR\" [-l, --learn]"
echo " USER ID \"$USER_ID\" [-u, --uid]"
echo " GROUP ID \"$GROUP_ID\" [-g, --gid]"
echo " SHM_SIZE \"$SHM_SIZE\" [--shm-size]"
}

for arg in "$@"
Expand Down Expand Up @@ -96,6 +98,9 @@ do
-g=*|--gid=*)
GROUP_ID="${arg#*=}"
;;
--shm-size=*)
SHM_SIZE="${arg#*=}"
;;
*)
# unknown option
echo "Unknown option \"$arg\""
Expand Down Expand Up @@ -151,7 +156,7 @@ if [[ "$RUN" = true ]]; then
RUN_OPT="-u $CURR_UID:$CURR_GID --net=host --env DISPLAY=$DISPLAY \
--volume /tmp/.X11-unix:/tmp/.X11-unix \
--privileged $MOUNT_DEVEL $MOUNT_LEARN \
--shm-size 256m $GPU_OPT $CONT_NAME \
--shm-size $SHM_SIZE $GPU_OPT $CONT_NAME \
-it $DETACH --rm $IMAGE_NAME:latest"
echo "docker run $RUN_OPT $COMMAND"

Expand Down

0 comments on commit 7d3d349

Please sign in to comment.