-
Notifications
You must be signed in to change notification settings - Fork 463
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
Clarify the docker commands for compilation #106
Conversation
This is the very first time I use docker, and I'm learning. Thas `pwd` told me nothing, I thought it was a password. But the correct value is the project path. I was able to compile after this fix: ```bat C:\full-path-to-my-biosim4-folder\biosim4\>docker run --rm -ti -v C:\full-path-to-my-biosim4-folder\biosim4:/app --name biosim biosim4 make test -d bin/Debug || mkdir -p bin/Debug test -d obj/Debug/src || mkdir -p obj/Debug/src c++ -Wall -pedantic -std=c++17 -fexceptions -fopenmp -I/usr/include/opencv4 -g -c src/analysis.cpp -o obj/Debug/src/analysis.o c++ -Wall -pedantic -std=c++17 -fexceptions -fopenmp -I/usr/include/opencv4 -g -c src/basicTypes.cpp -o obj/Debug/src/basicTypes.o c++ -Wall -pedantic -std=c++17 -fexceptions -fopenmp -I/usr/include/opencv4 -g -c src/createBarrier.cpp -o obj/Debug/src/createBarrier.o c++ -Wall -pedantic -std=c++17 -fexceptions -fopenmp -I/usr/include/opencv4 -g -c src/endOfGeneration.cpp -o obj/Debug/src/endOfGeneration.o c++ -Wall -pedantic -std=c++17 -fexceptions -fopenmp -I/usr/include/opencv4 -g -c src/endOfSimStep.cpp -o obj/Debug/src/endOfSimStep.o c++ -Wall -pedantic -std=c++17 -fexceptions -fopenmp -I/usr/include/opencv4 -g -c src/executeActions.cpp -o obj/Debug/src/executeActions.o c++ -Wall -pedantic -std=c++17 -fexceptions -fopenmp -I/usr/include/opencv4 -g -c src/feedForward.cpp -o obj/Debug/src/feedForward.o c++ -Wall -pedantic -std=c++17 -fexceptions -fopenmp -I/usr/include/opencv4 -g -c src/genome-compare.cpp -o obj/Debug/src/genome-compare.o c++ -Wall -pedantic -std=c++17 -fexceptions -fopenmp -I/usr/include/opencv4 -g -c src/genome.cpp -o obj/Debug/src/genome.o c++ -Wall -pedantic -std=c++17 -fexceptions -fopenmp -I/usr/include/opencv4 -g -c src/getSensor.cpp -o obj/Debug/src/getSensor.o c++ -Wall -pedantic -std=c++17 -fexceptions -fopenmp -I/usr/include/opencv4 -g -c src/grid.cpp -o obj/Debug/src/grid.o c++ -Wall -pedantic -std=c++17 -fexceptions -fopenmp -I/usr/include/opencv4 -g -c src/imageWriter.cpp -o obj/Debug/src/imageWriter.o c++ -Wall -pedantic -std=c++17 -fexceptions -fopenmp -I/usr/include/opencv4 -g -c src/indiv.cpp -o obj/Debug/src/indiv.o c++ -Wall -pedantic -std=c++17 -fexceptions -fopenmp -I/usr/include/opencv4 -g -c src/main.cpp -o obj/Debug/src/main.o c++ -Wall -pedantic -std=c++17 -fexceptions -fopenmp -I/usr/include/opencv4 -g -c src/params.cpp -o obj/Debug/src/params.o c++ -Wall -pedantic -std=c++17 -fexceptions -fopenmp -I/usr/include/opencv4 -g -c src/peeps.cpp -o obj/Debug/src/peeps.o c++ -Wall -pedantic -std=c++17 -fexceptions -fopenmp -I/usr/include/opencv4 -g -c src/random.cpp -o obj/Debug/src/random.o c++ -Wall -pedantic -std=c++17 -fexceptions -fopenmp -I/usr/include/opencv4 -g -c src/signals.cpp -o obj/Debug/src/signals.o c++ -Wall -pedantic -std=c++17 -fexceptions -fopenmp -I/usr/include/opencv4 -g -c src/simulator.cpp -o obj/Debug/src/simulator.o c++ -Wall -pedantic -std=c++17 -fexceptions -fopenmp -I/usr/include/opencv4 -g -c src/spawnNewGeneration.cpp -o obj/Debug/src/spawnNewGeneration.o c++ -Wall -pedantic -std=c++17 -fexceptions -fopenmp -I/usr/include/opencv4 -g -c src/survival-criteria.cpp -o obj/Debug/src/survival-criteria.o c++ -Wall -pedantic -std=c++17 -fexceptions -fopenmp -I/usr/include/opencv4 -g -c src/unitTestBasicTypes.cpp -o obj/Debug/src/unitTestBasicTypes.o c++ -Wall -pedantic -std=c++17 -fexceptions -fopenmp -I/usr/include/opencv4 -g -c src/unitTestConnectNeuralNetWiringFromGenome.cpp -o obj/Debug/src/unitTestConnectNeuralNetWiringFromGenome.o c++ -Wall -pedantic -std=c++17 -fexceptions -fopenmp -I/usr/include/opencv4 -g -c src/unitTestGridVisitNeighborhood.cpp -o obj/Debug/src/unitTestGridVisitNeighborhood.o c++ -o bin/Debug/biosim4 obj/Debug/src/analysis.o obj/Debug/src/basicTypes.o obj/Debug/src/createBarrier.o obj/Debug/src/endOfGeneration.o obj/Debug/src/endOfSimStep.o obj/Debug/src/executeActions.o obj/Debug/src/feedForward.o obj/Debug/src/genome-compare.o obj/Debug/src/genome.o obj/Debug/src/getSensor.o obj/Debug/src/grid.o obj/Debug/src/imageWriter.o obj/Debug/src/indiv.o obj/Debug/src/main.o obj/Debug/src/params.o obj/Debug/src/peeps.o obj/Debug/src/random.o obj/Debug/src/signals.o obj/Debug/src/simulator.o obj/Debug/src/spawnNewGeneration.o obj/Debug/src/survival-criteria.o obj/Debug/src/unitTestBasicTypes.o obj/Debug/src/unitTestConnectNeuralNetWiringFromGenome.o obj/Debug/src/unitTestGridVisitNeighborhood.o -lopencv_core -lopencv_video -lopencv_videoio -lgomp -lpthread -fopenmp test -d bin/Release || mkdir -p bin/Release test -d obj/Release/src || mkdir -p obj/Release/src c++ -Wall -pedantic -std=c++17 -fexceptions -fopenmp -I/usr/include/opencv4 -O3 -c src/analysis.cpp -o obj/Release/src/analysis.o c++ -Wall -pedantic -std=c++17 -fexceptions -fopenmp -I/usr/include/opencv4 -O3 -c src/basicTypes.cpp -o obj/Release/src/basicTypes.o c++ -Wall -pedantic -std=c++17 -fexceptions -fopenmp -I/usr/include/opencv4 -O3 -c src/createBarrier.cpp -o obj/Release/src/createBarrier.o c++ -Wall -pedantic -std=c++17 -fexceptions -fopenmp -I/usr/include/opencv4 -O3 -c src/endOfGeneration.cpp -o obj/Release/src/endOfGeneration.o c++ -Wall -pedantic -std=c++17 -fexceptions -fopenmp -I/usr/include/opencv4 -O3 -c src/endOfSimStep.cpp -o obj/Release/src/endOfSimStep.o c++ -Wall -pedantic -std=c++17 -fexceptions -fopenmp -I/usr/include/opencv4 -O3 -c src/executeActions.cpp -o obj/Release/src/executeActions.o c++ -Wall -pedantic -std=c++17 -fexceptions -fopenmp -I/usr/include/opencv4 -O3 -c src/feedForward.cpp -o obj/Release/src/feedForward.o c++ -Wall -pedantic -std=c++17 -fexceptions -fopenmp -I/usr/include/opencv4 -O3 -c src/genome-compare.cpp -o obj/Release/src/genome-compare.o c++ -Wall -pedantic -std=c++17 -fexceptions -fopenmp -I/usr/include/opencv4 -O3 -c src/genome.cpp -o obj/Release/src/genome.o c++ -Wall -pedantic -std=c++17 -fexceptions -fopenmp -I/usr/include/opencv4 -O3 -c src/getSensor.cpp -o obj/Release/src/getSensor.o c++ -Wall -pedantic -std=c++17 -fexceptions -fopenmp -I/usr/include/opencv4 -O3 -c src/grid.cpp -o obj/Release/src/grid.o c++ -Wall -pedantic -std=c++17 -fexceptions -fopenmp -I/usr/include/opencv4 -O3 -c src/imageWriter.cpp -o obj/Release/src/imageWriter.o c++ -Wall -pedantic -std=c++17 -fexceptions -fopenmp -I/usr/include/opencv4 -O3 -c src/indiv.cpp -o obj/Release/src/indiv.o c++ -Wall -pedantic -std=c++17 -fexceptions -fopenmp -I/usr/include/opencv4 -O3 -c src/main.cpp -o obj/Release/src/main.o c++ -Wall -pedantic -std=c++17 -fexceptions -fopenmp -I/usr/include/opencv4 -O3 -c src/params.cpp -o obj/Release/src/params.o c++ -Wall -pedantic -std=c++17 -fexceptions -fopenmp -I/usr/include/opencv4 -O3 -c src/peeps.cpp -o obj/Release/src/peeps.o c++ -Wall -pedantic -std=c++17 -fexceptions -fopenmp -I/usr/include/opencv4 -O3 -c src/random.cpp -o obj/Release/src/random.o c++ -Wall -pedantic -std=c++17 -fexceptions -fopenmp -I/usr/include/opencv4 -O3 -c src/signals.cpp -o obj/Release/src/signals.o c++ -Wall -pedantic -std=c++17 -fexceptions -fopenmp -I/usr/include/opencv4 -O3 -c src/simulator.cpp -o obj/Release/src/simulator.o c++ -Wall -pedantic -std=c++17 -fexceptions -fopenmp -I/usr/include/opencv4 -O3 -c src/spawnNewGeneration.cpp -o obj/Release/src/spawnNewGeneration.o c++ -Wall -pedantic -std=c++17 -fexceptions -fopenmp -I/usr/include/opencv4 -O3 -c src/survival-criteria.cpp -o obj/Release/src/survival-criteria.o c++ -Wall -pedantic -std=c++17 -fexceptions -fopenmp -I/usr/include/opencv4 -O3 -c src/unitTestBasicTypes.cpp -o obj/Release/src/unitTestBasicTypes.o c++ -Wall -pedantic -std=c++17 -fexceptions -fopenmp -I/usr/include/opencv4 -O3 -c src/unitTestConnectNeuralNetWiringFromGenome.cpp -o obj/Release/src/unitTestConnectNeuralNetWiringFromGenome.o c++ -Wall -pedantic -std=c++17 -fexceptions -fopenmp -I/usr/include/opencv4 -O3 -c src/unitTestGridVisitNeighborhood.cpp -o obj/Release/src/unitTestGridVisitNeighborhood.o c++ -o bin/Release/biosim4 obj/Release/src/analysis.o obj/Release/src/basicTypes.o obj/Release/src/createBarrier.o obj/Release/src/endOfGeneration.o obj/Release/src/endOfSimStep.o obj/Release/src/executeActions.o obj/Release/src/feedForward.o obj/Release/src/genome-compare.o obj/Release/src/genome.o obj/Release/src/getSensor.o obj/Release/src/grid.o obj/Release/src/imageWriter.o obj/Release/src/indiv.o obj/Release/src/main.o obj/Release/src/params.o obj/Release/src/peeps.o obj/Release/src/random.o obj/Release/src/signals.o obj/Release/src/simulator.o obj/Release/src/spawnNewGeneration.o obj/Release/src/survival-criteria.o obj/Release/src/unitTestBasicTypes.o obj/Release/src/unitTestConnectNeuralNetWiringFromGenome.o obj/Release/src/unitTestGridVisitNeighborhood.o -lopencv_core -lopencv_video -lopencv_videoio -lgomp -lpthread -fopenmp -O3 -s ```
I was trying to run OpenCV and CMake directly on windows, added clarification for docker users.
Hi @luiscla27, thanks for this PR. It looks good to me, but I'm not a docker person, so, before updating the documentation, I'd like to appeal to the community for a review of the suggested wording for accuracy and clarity. |
Thanks for the refinements. Appealing to the community for an independent review and confirmation. |
@luiscla27 apologies for the presumptions of knowledge in the docker contribution. my impression was that the docker-on-windows community has largely moved to "just use Linux" to avoid many headaches, so I presumed users would just be using the WSL layer for docker interactions on Windows. thanks for the contribution. I left some suggestions but otherwise LGTM |
|
||
RUN apt-get update && apt-get install -yqq \ | ||
cimg-dev \ | ||
gnuplot \ | ||
libopencv-dev \ | ||
cmake \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wasn't technically necessary before, but it seems like the option is here now so it can't hurt to include it.
Co-authored-by: Michael Pilosov <40366263+mathematicalmichael@users.noreply.github.com>
Co-authored-by: Michael Pilosov <40366263+mathematicalmichael@users.noreply.github.com>
This is the very first time I use docker, and I'm learning. Thas
pwd
told me nothing, I thought it was a password.But the correct value is the project path.
I was able to compile after this fix: