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

Dockerfile for training container #60

Closed
h1alexbel opened this issue Sep 11, 2024 · 10 comments
Closed

Dockerfile for training container #60

h1alexbel opened this issue Sep 11, 2024 · 10 comments
Assignees
Labels
enhancement New feature or request

Comments

@h1alexbel
Copy link
Owner

h1alexbel commented Sep 11, 2024

Let's prepare Dockerfile where we will do exactly the same as in justfile, but inside docker container. This image should be deployed as container that will do the experiment.

@h1alexbel h1alexbel added the enhancement New feature or request label Sep 11, 2024
@h1alexbel h1alexbel self-assigned this Sep 11, 2024
@h1alexbel h1alexbel changed the title experiment in docker Dockerfile for training container Sep 25, 2024
@h1alexbel
Copy link
Owner Author

see: #7 (comment)

h1alexbel added a commit that referenced this issue Oct 7, 2024
h1alexbel added a commit that referenced this issue Oct 7, 2024
h1alexbel added a commit that referenced this issue Oct 7, 2024
h1alexbel added a commit that referenced this issue Oct 7, 2024
h1alexbel added a commit that referenced this issue Oct 7, 2024
h1alexbel added a commit that referenced this issue Oct 7, 2024
h1alexbel added a commit that referenced this issue Oct 7, 2024
h1alexbel added a commit that referenced this issue Oct 7, 2024
h1alexbel added a commit that referenced this issue Oct 7, 2024
h1alexbel added a commit that referenced this issue Oct 7, 2024
h1alexbel added a commit that referenced this issue Oct 7, 2024
h1alexbel added a commit that referenced this issue Oct 7, 2024
@h1alexbel
Copy link
Owner Author

@rultor release, tag is 0.0.1

@rultor
Copy link
Collaborator

rultor commented Oct 7, 2024

@rultor release, tag is 0.0.1

@h1alexbel OK, I will release it now. Please check the progress here.

@rultor
Copy link
Collaborator

rultor commented Oct 7, 2024

@rultor release, tag is 0.0.1

@h1alexbel Oops, I failed. You can see the full log here (spent 4s).

+ set -e
+ set -o pipefail
++ dirname ./run.sh
+ cd .
+ echo 1020
+ echo '2.0-SNAPSHOT BUILD'
2.0-SNAPSHOT BUILD
+ date
Mon Oct  7 12:09:37 UTC 2024
+ uptime
 12:09:37 up 1 min,  0 users,  load average: 1.69, 0.51, 0.18
+ cat
.rultor.yml in h1alexbel/home doesn't allow h1alexbel/sr-detection to use its assets (there are 6 friends), see http://doc.rultor.com/reference.html#assets
+ exit -1
'cid' file is absent, most probably the Docker container wasn't started correctly

@h1alexbel
Copy link
Owner Author

@rultor release, tag is 0.0.1

@rultor
Copy link
Collaborator

rultor commented Oct 7, 2024

@rultor release, tag is 0.0.1

@h1alexbel OK, I will release it now. Please check the progress here.

@rultor
Copy link
Collaborator

rultor commented Oct 7, 2024

@rultor release, tag is 0.0.1

@h1alexbel Oops, I failed. You can see the full log here (spent 19min).

-rw-rw-r--  1 ubuntu ubuntu 8689 Oct  7 12:32 stdout
++ pwd
++ pwd
+ docker run -t --rm -v /tmp/rultor-nOP8:/main --env=head=git@github.com:h1alexbel/sr-detection.git --env=tag=0.0.1 '--env=scripts=( '\''export '\''\'\'''\''head=git@github.com:h1alexbel/sr-detection.git'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''tag=0.0.1'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''head_branch=master'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''author=h1alexbel'\''\'\'''\'''\'' '\'';'\'' '\''rustup update'\'' '\'';'\'' '\''cargo install --version 1.30.1 just'\'' '\'';'\'' '\''curl -sSL https://install.python-poetry.org | python3 - && rm -rf /var/lib/apt/lists/*'\'' '\'';'\'' '\''export PATH="$HOME/.local/bin:$PATH'\'' '\'';'\'' '\''[[ "${tag}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] || exit -1'\'' '\'';'\'' '\''repo=h1alexbel/sr-detection'\'' '\'';'\'' '\''sed -i -e "s/^0.0.0/${tag}/" Dockerfile'\'' '\'';'\'' '\''sudo docker build "$(pwd)" --tag "${repo}:${tag}"'\'' '\'';'\'' '\''sudo docker tag "${repo}:${tag}" "${repo}:latest"'\'' '\'';'\'' '\''cat ../docker-password | sudo docker login --password-stdin --username h1alexbel'\'' '\'';'\'' '\''sudo docker push "${repo}:${tag}"'\'' '\'';'\'' '\''sudo docker push "${repo}:latest"'\'' '\'';'\'' )' --env=head_branch=master --env=author=h1alexbel --hostname=docker --privileged --net=host --memory=8g --memory-swap=16g --oom-kill-disable --cidfile=/tmp/rultor-nOP8/cid -w=/main -v /var/run/docker.sock:/var/run/docker.sock --name=h1alexbel_sr-detection_60 yegor256/rultor-image:1.23.1 /main/entry.sh
WARNING: Your kernel does not support OomKillDisable. OomKillDisable discarded.
Using /usr/local/rvm/gems/ruby-3.2.2
Using /usr/local/rvm/gems/ruby-3.2.2
+ set -e
+ set -o pipefail
+ shopt -s dotglob
+ useradd -m -G sudo r
++ awk -F : '$3 > 100 { print $1 }'
++ cat /etc/group
+ for g in $(cat /etc/group | awk  -F  ':' '$3 > 100 { print $1 }')
+ usermod -a -G nogroup r
+ for g in $(cat /etc/group | awk  -F  ':' '$3 > 100 { print $1 }')
+ usermod -a -G systemd-journal r
+ for g in $(cat /etc/group | awk  -F  ':' '$3 > 100 { print $1 }')
+ usermod -a -G systemd-network r
+ for g in $(cat /etc/group | awk  -F  ':' '$3 > 100 { print $1 }')
+ usermod -a -G systemd-resolve r
+ for g in $(cat /etc/group | awk  -F  ':' '$3 > 100 { print $1 }')
+ usermod -a -G messagebus r
+ for g in $(cat /etc/group | awk  -F  ':' '$3 > 100 { print $1 }')
+ usermod -a -G systemd-timesync r
+ for g in $(cat /etc/group | awk  -F  ':' '$3 > 100 { print $1 }')
+ usermod -a -G _ssh r
+ for g in $(cat /etc/group | awk  -F  ':' '$3 > 100 { print $1 }')
+ usermod -a -G rvm r
+ for g in $(cat /etc/group | awk  -F  ':' '$3 > 100 { print $1 }')
+ usermod -a -G ssl-cert r
+ for g in $(cat /etc/group | awk  -F  ':' '$3 > 100 { print $1 }')
+ usermod -a -G postgres r
+ for g in $(cat /etc/group | awk  -F  ':' '$3 > 100 { print $1 }')
+ usermod -a -G r r
+ usermod -s /bin/bash r
+ echo '%sudo ALL=(ALL) NOPASSWD:ALL'
+ cp -R /root/.bashrc /root/.cargo /root/.config /root/.gem /root/.gemrc /root/.launchpadlib /root/.m2 /root/.npm /root/.profile /root/.rustup /root/.rvmrc /root/texmf /home/r
+ cp -R ./cid ./docker-password ./end.sh ./entry.sh ./pid ./repo ./run.sh ./script.sh ./stdout /home/r
+ rm -rf repo
+ chown -R r:r /home/r
+ chmod a+x /home/r/script.sh
+ cat /home/r/script.sh
#!/bin/bash
set -e
set -o pipefail
if [ -e /home/r/.profile ]; then source /home/r/.profile; fi
shopt -s expand_aliases
alias 'sudo=sudo -i'
export HOME=/home/r
cd "${HOME}/repo"
export 'head=git@github.com:h1alexbel/sr-detection.git' ; export 'tag=0.0.1' ; export 'head_branch=master' ; export 'author=h1alexbel' ; rustup update ; cargo install --version 1.30.1 just ; curl -sSL https://install.python-poetry.org | python3 - && rm -rf /var/lib/apt/lists/* ; export PATH="$HOME/.local/bin:$PATH ; [[ "${tag}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] || exit -1 ; repo=h1alexbel/sr-detection ; sed -i -e "s/^0.0.0/${tag}/" Dockerfile ; sudo docker build "$(pwd)" --tag "${repo}:${tag}" ; sudo docker tag "${repo}:${tag}" "${repo}:latest" ; cat ../docker-password | sudo docker login --password-stdin --username h1alexbel ; sudo docker push "${repo}:${tag}" ; sudo docker push "${repo}:latest" ;
+ su --login r --command /home/r/script.sh
Using /usr/local/rvm/gems/ruby-3.2.2
Using /usr/local/rvm/gems/ruby-3.2.2
Using /usr/local/rvm/gems/ruby-3.2.2
Using /usr/local/rvm/gems/ruby-3.2.2
/home/r/script.sh: line 9: unexpected EOF while looking for matching `"'
container 4f991f18988a6fb4555c258ad0b1963abbedddc2f411da110646dc37bccc764e is dead
Mon Oct  7 12:34:25 UTC 2024

h1alexbel added a commit that referenced this issue Oct 7, 2024
@h1alexbel
Copy link
Owner Author

@rultor release, tag is 0.0.1

@rultor
Copy link
Collaborator

rultor commented Oct 7, 2024

@rultor release, tag is 0.0.1

@h1alexbel OK, I will release it now. Please check the progress here.

@rultor
Copy link
Collaborator

rultor commented Oct 7, 2024

@rultor release, tag is 0.0.1

@h1alexbel Oops, I failed. You can see the full log here (spent 21min).

-rw-rw-r--  1 ubuntu ubuntu 8624 Oct  7 13:01 stdout
++ pwd
++ pwd
+ docker run -t --rm -v /tmp/rultor-VTNr:/main --env=head=git@github.com:h1alexbel/sr-detection.git --env=tag=0.0.1 '--env=scripts=( '\''export '\''\'\'''\''head=git@github.com:h1alexbel/sr-detection.git'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''tag=0.0.1'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''head_branch=master'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''author=h1alexbel'\''\'\'''\'''\'' '\'';'\'' '\''rustup update'\'' '\'';'\'' '\''cargo install --version 1.30.1 just'\'' '\'';'\'' '\''curl -sSL https://install.python-poetry.org | python3'\'' '\'';'\'' '\''export PATH="$HOME/.local/bin:$PATH'\'' '\'';'\'' '\''[[ "${tag}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] || exit -1'\'' '\'';'\'' '\''repo=h1alexbel/sr-detection'\'' '\'';'\'' '\''sed -i -e "s/^0.0.0/${tag}/" Dockerfile'\'' '\'';'\'' '\''sudo docker build "$(pwd)" --tag "${repo}:${tag}"'\'' '\'';'\'' '\''sudo docker tag "${repo}:${tag}" "${repo}:latest"'\'' '\'';'\'' '\''cat ../docker-password | sudo docker login --password-stdin --username h1alexbel'\'' '\'';'\'' '\''sudo docker push "${repo}:${tag}"'\'' '\'';'\'' '\''sudo docker push "${repo}:latest"'\'' '\'';'\'' )' --env=head_branch=master --env=author=h1alexbel --hostname=docker --privileged --net=host --memory=8g --memory-swap=16g --oom-kill-disable --cidfile=/tmp/rultor-VTNr/cid -w=/main -v /var/run/docker.sock:/var/run/docker.sock --name=h1alexbel_sr-detection_60 yegor256/rultor-image:1.23.1 /main/entry.sh
WARNING: Your kernel does not support OomKillDisable. OomKillDisable discarded.
Using /usr/local/rvm/gems/ruby-3.2.2
Using /usr/local/rvm/gems/ruby-3.2.2
+ set -e
+ set -o pipefail
+ shopt -s dotglob
+ useradd -m -G sudo r
++ awk -F : '$3 > 100 { print $1 }'
++ cat /etc/group
+ for g in $(cat /etc/group | awk  -F  ':' '$3 > 100 { print $1 }')
+ usermod -a -G nogroup r
+ for g in $(cat /etc/group | awk  -F  ':' '$3 > 100 { print $1 }')
+ usermod -a -G systemd-journal r
+ for g in $(cat /etc/group | awk  -F  ':' '$3 > 100 { print $1 }')
+ usermod -a -G systemd-network r
+ for g in $(cat /etc/group | awk  -F  ':' '$3 > 100 { print $1 }')
+ usermod -a -G systemd-resolve r
+ for g in $(cat /etc/group | awk  -F  ':' '$3 > 100 { print $1 }')
+ usermod -a -G messagebus r
+ for g in $(cat /etc/group | awk  -F  ':' '$3 > 100 { print $1 }')
+ usermod -a -G systemd-timesync r
+ for g in $(cat /etc/group | awk  -F  ':' '$3 > 100 { print $1 }')
+ usermod -a -G _ssh r
+ for g in $(cat /etc/group | awk  -F  ':' '$3 > 100 { print $1 }')
+ usermod -a -G rvm r
+ for g in $(cat /etc/group | awk  -F  ':' '$3 > 100 { print $1 }')
+ usermod -a -G ssl-cert r
+ for g in $(cat /etc/group | awk  -F  ':' '$3 > 100 { print $1 }')
+ usermod -a -G postgres r
+ for g in $(cat /etc/group | awk  -F  ':' '$3 > 100 { print $1 }')
+ usermod -a -G r r
+ usermod -s /bin/bash r
+ echo '%sudo ALL=(ALL) NOPASSWD:ALL'
+ cp -R /root/.bashrc /root/.cargo /root/.config /root/.gem /root/.gemrc /root/.launchpadlib /root/.m2 /root/.npm /root/.profile /root/.rustup /root/.rvmrc /root/texmf /home/r
+ cp -R ./cid ./docker-password ./end.sh ./entry.sh ./pid ./repo ./run.sh ./script.sh ./stdout /home/r
+ rm -rf repo
+ chown -R r:r /home/r
+ chmod a+x /home/r/script.sh
+ cat /home/r/script.sh
#!/bin/bash
set -e
set -o pipefail
if [ -e /home/r/.profile ]; then source /home/r/.profile; fi
shopt -s expand_aliases
alias 'sudo=sudo -i'
export HOME=/home/r
cd "${HOME}/repo"
export 'head=git@github.com:h1alexbel/sr-detection.git' ; export 'tag=0.0.1' ; export 'head_branch=master' ; export 'author=h1alexbel' ; rustup update ; cargo install --version 1.30.1 just ; curl -sSL https://install.python-poetry.org | python3 ; export PATH="$HOME/.local/bin:$PATH ; [[ "${tag}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] || exit -1 ; repo=h1alexbel/sr-detection ; sed -i -e "s/^0.0.0/${tag}/" Dockerfile ; sudo docker build "$(pwd)" --tag "${repo}:${tag}" ; sudo docker tag "${repo}:${tag}" "${repo}:latest" ; cat ../docker-password | sudo docker login --password-stdin --username h1alexbel ; sudo docker push "${repo}:${tag}" ; sudo docker push "${repo}:latest" ;
+ su --login r --command /home/r/script.sh
Using /usr/local/rvm/gems/ruby-3.2.2
Using /usr/local/rvm/gems/ruby-3.2.2
Using /usr/local/rvm/gems/ruby-3.2.2
Using /usr/local/rvm/gems/ruby-3.2.2
/home/r/script.sh: line 9: unexpected EOF while looking for matching `"'
container 8edb3279a3a097f2fa7090ef0a16ede22487c703a7f5ef5eb14339a1affaf06e is dead
Mon Oct  7 13:03:09 UTC 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants