Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #6

Merged
merged 1 commit into from
Oct 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
if [[ $(id -u) -eq 0 ]]; then
echo "This script cannot be executed with root privileges."
echo "Please re-run without sudo and follow instructions to configure docker for non-root user if needed."
# exit 1
exit 1
fi

# Check if user can run docker without root.
Expand All @@ -17,14 +17,14 @@ if [[ ! $(groups $USER) =~ $RE ]]; then
echo "User |$USER| is not a member of the 'docker' group and cannot run docker commands without sudo."
echo "Run 'sudo usermod -aG docker \$USER && newgrp docker' to add user to 'docker' group, then re-run this script."
echo "See: https://docs.docker.com/engine/install/linux-postinstall/"
# exit 1
exit 1
fi

# Check if able to run docker commands.
if [[ -z "$(docker ps)" ]] ; then
echo "Unable to run docker commands. If you have recently added |$USER| to 'docker' group, you may need to log out and log back in for it to take effect."
echo "Otherwise, please check your Docker installation."
# exit 1
exit 1
fi

PLATFORM="$(uname -m)"
Expand All @@ -35,7 +35,4 @@ if [ $PLATFORM = "x86_64" ]; then
docker run -it --rm -v $ROOT:/app -w /app --network host ghcr.io/moriyalab/lab_tool:latest /bin/bash
else
echo "Not Support Platform. Only support x86."
docker pull ghcr.io/moriyalab/lab_tool:latest
docker run -it --rm -v $ROOT:/app -w /app --network host ghcr.io/moriyalab/lab_tool:latest /bin/bash

fi
Loading