Mentions légales du service

Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • nicolas.ducarton/dockerfiles
1 result
Show changes
Commits on Source (2)
#get fist param, help, check, build #get fist param, help, check, build
p=${1-unset} p=${1-'unset'}
g=${2-unset} g=${2-unset}
#print help #print help
HELP (){ HELP (){
echo "usage: ./launch-test <config> <action> [type] [path]"; echo -e "usage: ./launch-test <config> <action> [type] [path]";
echo "config: "; echo -e "config: ";
echo "\t all : launch on all available configs"; echo -e "\t all : launch on all available configs";
echo "\t config name : launch on this particular docker config (a folder with that name containing a dockerfile must exist)"; echo -e "\t config name : launch on this particular docker config (a folder with that name containing a dockerfile must exist)";
echo "action: "; echo -e "action: ";
echo "\t help: print this"; echo -e "\t help: print this";
echo "\t check: build starpu and run tests"; echo -e "\t check: build starpu and run tests";
echo "\t build: only build starpu"; echo -e "\t build: only build starpu";
echo "\t run <type> <path> [program] [interactive=no]: run type (script) located at path inside the container"; echo -e "\t run : run [type] located at [path] (they must be provided)";
echo "\t if a path is provided as [program], it is first copied to the container, then the script is executed"; echo -e "\t\t type : script or (test (TODO))";
echo "\t this script then expects a \"test\" file to exist inside the container, and will launch it with or without gdb depending on the interactive option (no/yes)"; echo -e "\t\t path : path to script (or test name (TODO))";
echo "\t\t type : script or (test (TODO))"; echo -e "\t TODO gdb interactive guest_script/host_script";
echo "\t\t path : path to script (or test name (TODO))"; echo -e "\t TODO : remove all created images";
echo "\t TODO gdb interactive guest_script/host_script";
echo "\t TODO : remove all created images";
} }
GETPU(){ GETPU(){
rm -r ./starpu
cp -r /home/user/shared/tmp ./starpu
#if starpu folder does not exist clone #if starpu folder does not exist clone
if [ ! -d "starpu" ] if [ ! -d "starpu" ]
then then
...@@ -57,18 +57,23 @@ RUN(){ ...@@ -57,18 +57,23 @@ RUN(){
HELP HELP
else else
#check that it exists #check that it exists
docker rm $(docker ps -a -q --filter ancestor=starpu_test/$p:latest --format="{{.ID}}")
cp $p/Dockerfile . cp $p/Dockerfile .
echo "building";
docker build -t starpu_test/$p . > docker_results/docker_build_$p docker build -t starpu_test/$p . > docker_results/docker_build_$p
rm ./Dockerfile rm ./Dockerfile
docker run starpu_test/$p > docker_results/docker_run_$p echo "running";
docker rm $(docker stop $(docker ps -a -q --filter ancestor=starpu_test/$p:latest --format="{{.ID}}")) docker run starpu_test/$p &
#copy script
docker cp ./run.sh $(docker ps -a -q --filter ancestor=starpu_test/$p:latest --format="{{.ID}}"):/home/starpu
#run it
docker exec $(docker ps -a -q --filter ancestor=starpu_test/$p:latest --format="{{.ID}}") /bin/bash ./run.sh
# docker exec $(docker ps -a -q --filter ancestor=starpu_test/$p:latest --format="{{.ID}}") mpirun -np 4 xterm -e gdb --args build/mpi/tests/.libs/abstract_comms
# docker stop $(docker ps -a -q --filter ancestor=starpu_test/$p:latest --format="{{.ID}}")
#remove image? #remove image?
fi fi
} }
if [ $g = 'help' ] if [ $g = 'check' ]
then
HELP
elif [ $g = 'check' ]
then then
GETPU GETPU
cp check.sh run.sh cp check.sh run.sh
...@@ -97,5 +102,6 @@ then ...@@ -97,5 +102,6 @@ then
fi fi
fi fi
#Do for a particular test #Do for a particular test
else
HELP
fi fi
./run-test.sh: line 7: make: command not found
...@@ -27,6 +27,9 @@ WORKDIR /home/starpu ...@@ -27,6 +27,9 @@ WORKDIR /home/starpu
COPY run.sh . COPY run.sh .
RUN apt-get install -y texlive texlive-font-utils doxygen libtool-bin texlive-fonts-extra
RUN apt-get install -y libfxt-dev
ADD ./starpu /home/starpu/starpu ADD ./starpu /home/starpu/starpu
#So we don't run mpi as root #So we don't run mpi as root
RUN useradd starpu RUN useradd starpu
...@@ -35,4 +38,4 @@ RUN chmod +x ./run.sh ...@@ -35,4 +38,4 @@ RUN chmod +x ./run.sh
USER starpu USER starpu
#run whatever the script gave us #run whatever the script gave us
CMD ["/bin/bash", "./run.sh"] CMD ["sleep", "infinity"]
...@@ -36,7 +36,7 @@ RUN chmod +x ./run.sh ...@@ -36,7 +36,7 @@ RUN chmod +x ./run.sh
USER starpu USER starpu
#run whatever the script gave us #run whatever the script gave us
CMD ["/bin/bash", "./run.sh"] CMD ["sleep", "infinity"]
# Copy the script to compile and test starpu # Copy the script to compile and test starpu
#COPY #COPY
# Compile starpu and check # Compile starpu and check
......
...@@ -5,4 +5,3 @@ mkdir ../build ...@@ -5,4 +5,3 @@ mkdir ../build
cd ../build cd ../build
../starpu/configure --prefix=/home/starpu/install --disable-cuda --enable-mpi --disable-opencl --disable-starpupy --enable-mpi-ft --enable-mpi-check --enable-mpi-ft-stats > ../configure_result 2>&1 ../starpu/configure --prefix=/home/starpu/install --disable-cuda --enable-mpi --disable-opencl --disable-starpupy --enable-mpi-ft --enable-mpi-check --enable-mpi-ft-stats > ../configure_result 2>&1
LD_LIBRARY_PATH=/usr/local/lib make -j > ../make_result 2>&1 LD_LIBRARY_PATH=/usr/local/lib make -j > ../make_result 2>&1
make install
File moved
export LD_LIBRARY_PATH=/usr/local/lib
cd starpu
export HOME=/home/starpu
./autogen.sh > ../autogen_result 2>&1
mkdir ../build
cd ../build
##ARE THE OPTIONS RIGHT? I won't just copy the ci script.
../starpu/configure --prefix=/home/starpu/install --disable-cuda --enable-mpi --enable-build-doc-pdf --enable-verbose --disable-build-examples --disable-opencl --disable-starpupy --enable-mpi-ft --enable-mpi-check --enable-mpi-ft-stats > ../configure_result 2>&1
make -j > ../make_result 2>&1
make check > ../check_result 2>&1
export LD_LIBRARY_PATH=/usr/local/lib
cd starpu
./autogen.sh > ../autogen_result 2>&1
mkdir ../build
cd ../build
../starpu/configure --prefix=/home/starpu/install --disable-cuda --enable-mpi --disable-opencl --disable-starpupy --enable-mpi-ft --enable-mpi-check --enable-mpi-ft-stats --disable-build-examples > ../configure_result 2>&1
LD_LIBRARY_PATH=/usr/local/lib make -j > ../make_result 2>&1
cd mpi/tests/.libs/
export LD_LIBRARY_PATH=/usr/local/lib:/home/starpu/build/src/.libs:/home/starpu/build/mpi/src/.libs
STARPU_WORKERS_GETBIND=0 mpirun -np 4 ./abstract_comms > test_result