Closed nethsix closed 8 years ago
@chrhansen I have updated the circle.yml to test the code of the pull request instead of from the master (which is incorrect as you pointed out).
Please help me eyeball it when you have time. I have broken down the command line into parts here and sprinkled some comments to make it an easier read hopefully:
docker run
: Runs docker image-e CIRCLE_PROJECT_REPONAME=$CIRCLE_PROJECT_REPONAME -e CIRCLE_BRANCH=$CIRCLE_BRANCH
: Pass info to docker container about which repo (the person who pull requested), and which branch (pull requested)-it nethsix/ruby-tensorflow-ubuntu:0.0.1.a
: The docker image pre-built with Tensorflow to run/bin/bash -l -c
: run with bash within the docker containermkdir -p /repos/ruby-tensorflow/circle-ci && ...
: Create a directory under /repos/ruby-tensorflow to fetch repo/branch for testing. ruby-2.2.4 with gemset ruby-tensorflow is also selected since we cd'ed into /repos/ruby-tensorflow/cd /repos/ruby-tensorflow/circle-ci && git clone $CIRCLE_REPOSITORY_URL && cd /repos/ruby-tensorflow/circle-ci/ruby-tensorflow && git fetch && git checkout $CIRCLE_BRANCH && git pull && ...
: Pull the code to be testedbundle install && cd /repos/ruby-tensorflow/circle-ci/ruby-tensorflow/ext/sciruby/tensorflow_c && ruby extconf.rb && make && make install && cd /repos/ruby-tensorflow/circle-ci/ruby-tensorflow && bundle exec rake install && bundle exec rspec
: build, install, and run rspecThank you for all your help!
@nethsix thanks for the explanation - I don't have a lot of experience with Docker, though. I'm currently running docker run -e ...
on my own machine, to see what the heck happens. In the meantime, the comments/questions I have are:
docker run -e ...
into separate lines (is this the newline command? && \
), like how @geoffreylitt mentioned https://github.com/Arafatk/tensorflow.rb/pull/37#issuecomment-235784193? /repos/ruby-tensorflow
be updated to /repos/tensorflow.rb
?docker run -it ...
in the README, https://github.com/Arafatk/tensorflow.rb#docker, also be updated?UPDATE:
$dev docker run -e CIRCLE_PROJECT_REPONAME=$CIRCLE_PROJECT_REPONAME -e CIRCLE_BRANCH=$CIRCLE_BRANCH -it nethsix/ruby-tensorflow-ubuntu:0.0.1.a /bin/bash -l -c "mkdir -p /repos/ruby-tensorflow/circle-ci && cd /repos/ruby-tensorflow/circle-ci && git clone $CIRCLE_REPOSITORY_URL && cd /repos/ruby-tensorflow/circle-ci/ruby-tensorflow && git fetch && git checkout $CIRCLE_BRANCH && git pull && bundle install && cd /repos/ruby-tensorflow/circle-ci/ruby-tensorflow/ext/sciruby/tensorflow_c && ruby extconf.rb && make && make install && cd /repos/ruby-tensorflow/circle-ci/ruby-tensorflow && bundle exec rake install && bundle exec rspec"
Unable to find image 'nethsix/ruby-tensorflow-ubuntu:0.0.1.a' locally
0.0.1.a: Pulling from nethsix/ruby-tensorflow-ubuntu
90d6565b970a: Pull complete
40553bdb8474: Pull complete
...
...
3b542ee25736: Pull complete
5049651b65c8: Pull complete
Digest: sha256:6697849985834adf31e725db5240352a26804f023f49691d8eb96ff07d7f8741
Status: Downloaded newer image for nethsix/ruby-tensorflow-ubuntu:0.0.1.a
You must specify a repository to clone.
I guess I should have specified CIRCLE-env variables, but for whatever it's worth, I don't have other comments than those above.
@nethsix @Arafatk once this PR is ready and merged, I think we can safely trash https://github.com/Arafatk/tensorflow.rb/pull/31 and thank @nethsix for saving us all from an untested repo!
@chrhansen Thanks! Having another smart person (not necessarily an expert) to eyeball through things is always useful.
/repos/ruby-tensorflow
is the directory within the Docker image itself so I guess leaving it the name as ruby-tensorflow
is fine. I remember your comment about something similar in the Dockerfile, which I will update, and rebuild.
DO NOT MERGE YET: Under review
If you merge, nothing bad happens
Update circle.yml: