Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
oai5g-cn
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenXG
oai5g-cn
Commits
faa93d71
Commit
faa93d71
authored
Oct 16, 2024
by
bigbing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add docker install scripts
parent
8b16d1e4
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
113 additions
and
15 deletions
+113
-15
README.md
README.md
+2
-15
scripts/install.sh
scripts/install.sh
+77
-0
scripts/install_help
scripts/install_help
+34
-0
No files found.
README.md
View file @
faa93d71
...
...
@@ -4,21 +4,8 @@ This is forked from Eurecom Gitlab OAI5G-CN
# How to RUN
1.
OAI CN5G pre-requisites
```
sudo apt install -y git net-tools putty
# https://docs.docker.com/engine/install/ubuntu/
sudo apt install -y ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
echo "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
sudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
# Add your username to the docker group, otherwise you will have to run in sudo mode.
sudo usermod -a -G docker $(whoami)
reboot
cd scripts
sudo ./install.sh -I
```
2.
Pull OAI CN5G docker images
...
...
scripts/install.sh
0 → 100755
View file @
faa93d71
#!/bin/bash
THIS_SCRIPT_PATH
=
$(
dirname
$(
readlink
-f
$0
))
#echo "$THIS_SCRIPT_PATH"
source
${
THIS_SCRIPT_PATH
}
/install_help
function
help
()
{
echo_info
" "
echo_info
"Usage: build_allinone -I"
echo_info
" "
echo_info
"Options:"
echo_info
"Mandatory arguments to long options are mandatory for short options too."
echo_info
" -I, --install-deps Check installed software necessary to build and run Docker."
echo_info
" -h, --help Print this help."
echo_info
" "
}
function
main
()
{
if
[
$#
-lt
1
]
;
then
echo_error
"
$0
\"
-h
\"
Or
\"
--help
\"
"
fi
until
[
-z
"
$1
"
]
do
case
"
$1
"
in
-I
|
--install-deps
)
dv
=
$(
docker
-v
)
until
[
"
${
dv
:0:14
}
"
=
"Docker version"
]
do
apt-get update
apt-get
install
-y
docker.io
dv
=
$(
docker
-v
)
done
echo_success
"already installed docker"
# install curl
cv
=
$(
curl
-V
)
until
[
"
${
cv
:0:4
}
"
=
"curl"
]
do
apt-get
install
-y
curl
cv
=
$(
curl
-V
)
done
echo_success
"already installed curl"
# install docker-compose
dcv
=
$(
docker-compose
--version
)
until
[
${
dcv
:24:6
}
=
2.23.3
]
do
echo_info
"install docker-compose v2.23.3"
# curl -L "https://github.com/docker/compose/releases/download/1.28.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
cp
$THIS_SCRIPT_PATH
/../libs/docker-compose /usr/local/bin/docker-compose
chmod
+x /usr/local/bin/docker-compose
rm
/usr/bin/docker-compose
ln
-s
/usr/local/bin/docker-compose /usr/bin/docker-compose
dcv
=
$(
docker-compose
--version
)
done
echo_success
"already installed docker-compose"
shift
;;
-h
|
--help
)
help
shift
return
0
;;
*
)
echo_error
"Unknown option
$1
"
help
return
1
;;
esac
done
}
main
"
$@
"
scripts/install_help
0 → 100644
View file @
faa93d71
###############################
## echo and family
###############################
black='\E[30m'
red='\E[31m'
green='\E[32m'
yellow='\E[33m'
blue='\E[1;34m'
magenta='\E[35m'
cyan='\E[36m'
white='\E[37m'
reset_color='\E[00m'
COLORIZE=1
#-------------------------------------------------------------------------------
cecho() {
# Color-echo
# arg1 = message
# arg2 = color
local default_msg="No Message."
message=${1:-$default_msg}
color=${2:-$green}
[ "$COLORIZE" = "1" ] && message="$color$message$reset_color"
echo -e "$message"
return
}
echo_error() { cecho "$*" $red ;}
echo_fatal() { cecho "$*" $red; exit -1 ;}
echo_warning() { cecho "$*" $yellow ;}
echo_success() { cecho "$*" $green ;}
echo_info() { cecho "$*" $blue ;}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment