Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Sergey Gorbunov
CbmTools
Commits
4cae8c25
Commit
4cae8c25
authored
Jul 09, 2021
by
Sergey Gorbunov
Browse files
fix check for Darwin, remove unnecessary docker flags
parent
7a58d852
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
3 deletions
+28
-3
cbmdock/README.md
cbmdock/README.md
+25
-0
cbmdock/cbmdockInit.sh
cbmdock/cbmdockInit.sh
+3
-3
No files found.
cbmdock/README.md
View file @
4cae8c25
...
...
@@ -24,6 +24,30 @@ source ~/.baschrc
cbmdock
++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++
+++ How to SSH to the container
+++
*
the container IP address one gets by calling on the host maschine:
docker inspect -f "{{ .NetworkSettings.IPAddress }}" CBM-${USER}
( the output is, for example, 172.17.0.5 )
*
in order to use ssh one should set the cbmdock user password inside the container:
sudo passwd
*
on the host:
ssh -Y cbmdock@172.17.0.5
++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++
++++
**Software installation inside the container**
...
...
@@ -122,3 +146,4 @@ cd build
cmake ../cbmroot
make -j
source /home/cbmdock/build/config.sh
cbmdock/cbmdockInit.sh
View file @
4cae8c25
...
...
@@ -10,8 +10,7 @@ touch ~/.Xauthority
export
ContainerName
=
CBM-
${
USER
}
docker run
-td
--privileged
--security-opt
seccomp
=
unconfined
\
--net
=
host
--device
=
/dev/kfd
--device
=
/dev/dri
--cap-add
=
SYS_PTRACE
\
docker run
-td
--net
=
host
\
-v
/tmp/.X11-unix:/tmp/.X11-unix:ro
-v
${
HOME
}
:/tmp/hostHome:ro
-e
XAUTHORITY
=
/tmp/hostHome/.Xauthority
\
-e
HOME
=
/home/cbmdock
\
-v
~/cbmdock:/home/cbmdock
\
...
...
@@ -39,11 +38,12 @@ then
echo
cbmdock
alias
already exists
else
echo
create cbmdock
alias
if
[[
`
uname
-s
`
-eq
Darwin
]]
if
[[
`
uname
-s
`
==
Darwin
]]
then
echo
MacOSX detected
echo
"alias cbmdock='docker start "
${
ContainerName
}
"; docker exec -ti -e DISPLAY=host.docker.internal:0 "
${
ContainerName
}
" bash'"
>>
~/.bashrc
else
echo
Linux detected
echo
"alias cbmdock='docker start "
${
ContainerName
}
"; docker exec -ti -e DISPLAY=
\$
DISPLAY "
${
ContainerName
}
" bash'"
>>
~/.bashrc
fi
fi
\ No newline at end of file
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