Dallinger icon indicating copy to clipboard operation
Dallinger copied to clipboard

Instructions to develop an experiment with only docker as a dependency

Open silviot opened this issue 3 years ago • 7 comments

This is still a work in progress. Only the basic functionality (starting the experiment with dallinger develop debug) works for now. See #2584

silviot avatar Aug 25 '22 14:08 silviot

Codecov Report

Merging #4293 (a651ada) into master (6a8001f) will decrease coverage by 0.1%. The diff coverage is 100.0%.

Additional details and impacted files
@@           Coverage Diff            @@
##           master   #4293     +/-   ##
========================================
- Coverage    76.1%   76.1%   -0.0%     
========================================
  Files          40      40             
  Lines        6137    6136      -1     
  Branches      732     732             
========================================
- Hits         4666    4665      -1     
  Misses       1284    1284             
  Partials      187     187             

codecov[bot] avatar Aug 25 '22 14:08 codecov[bot]

Working so far for me!

pmcharrison avatar Aug 25 '22 15:08 pmcharrison

I'm hitting a wall with the user docker should run as. There are two options: either root or the current ${USER}. If I use the current ${USER} then ssh works fine (the files bind mounted from ${HOME}/.ssh have the correct ownership and permissions) but the user has no permission on /var/run/docker.sock (necessary to drive docker). If I use root then the docker sock is accessible, but ssh refuses to get credentials from a file with bad ownership.

I can unblock myself by recommending to run sudo chmod a+rw /var/run/docker.sock but it's not recommended to have that socket word writable.

silviot avatar Sep 07 '22 15:09 silviot

I'm hitting a wall with the user docker should run as. There are two options: either root or the current ${USER}. If I use the current ${USER} then ssh works fine (the files bind mounted from ${HOME}/.ssh have the correct ownership and permissions) but the user has no permission on /var/run/docker.sock (necessary to drive docker). If I use root then the docker sock is accessible, but ssh refuses to get credentials from a file with bad ownership.

I can unblock myself by recommending to run sudo chmod a+rw /var/run/docker.sock but it's not recommended to have that socket word writable.

How about piping the key to an SSH agent? e.g.

export MYKEY=`cat key.pem`
ssh-add - <<< "$MYKEY"
ssh [email protected]

pmcharrison avatar Sep 07 '22 15:09 pmcharrison

@silviot what is the best way to build a new Dallinger Docker image for our downstream testing? We have been queuing builds by pushing tags (e.g. v9.1.0docker3) but not sure if this is what you want.

pmcharrison avatar Sep 19 '22 09:09 pmcharrison

@silviot what is the best way to build a new Dallinger Docker image for our downstream testing? We have been queuing builds by pushing tags (e.g. v9.1.0docker3) but not sure if this is what you want.

That should be fine. Only caveat is that, if you push twice to the same tag, the second time the pypi release will fail since a release with that version is already present, and the CI job will be red. But the docker image pushing should work fine in that case too.

silviot avatar Sep 19 '22 16:09 silviot

@silviot what is the best way to build a new Dallinger Docker image for our downstream testing? We have been queuing builds by pushing tags (e.g. v9.1.0docker3) but not sure if this is what you want.

That should be fine. Only caveat is that, if you push twice to the same tag, the second time the pypi release will fail since a release with that version is already present, and the CI job will be red. But the docker image pushing should work fine in that case too.

OK sounds good!

pmcharrison avatar Sep 19 '22 16:09 pmcharrison