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
p=${1-unset}
p=${1-'unset'}
g=${2-unset}
#print help
HELP (){
echo "usage: ./launch-test <config> <action> [type] [path]";
echo "config: ";
echo "\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 "action: ";
echo "\t help: print this";
echo "\t check: build starpu and run tests";
echo "\t build: only build starpu";
echo "\t run <type> <path> [program] [interactive=no]: run type (script) located at path inside the container";
echo "\t if a path is provided as [program], it is first copied to the container, then the script is executed";
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 "\t\t type : script or (test (TODO))";
echo "\t\t path : path to script (or test name (TODO))";
echo "\t TODO gdb interactive guest_script/host_script";
echo "\t TODO : remove all created images";
echo -e "usage: ./launch-test <config> <action> [type] [path]";
echo -e "config: ";
echo -e "\t all : launch on all available configs";
echo -e "\t config name : launch on this particular docker config (a folder with that name containing a dockerfile must exist)";
echo -e "action: ";
echo -e "\t help: print this";
echo -e "\t check: build starpu and run tests";
echo -e "\t build: only build starpu";
echo -e "\t run : run [type] located at [path] (they must be provided)";
echo -e "\t\t type : script or (test (TODO))";
echo -e "\t\t path : path to script (or test name (TODO))";
echo -e "\t TODO gdb interactive guest_script/host_script";
echo -e "\t TODO : remove all created images";
}
GETPU(){
rm -r ./starpu
cp -r /home/user/shared/tmp ./starpu
#if starpu folder does not exist clone
if [ ! -d "starpu" ]
then
......@@ -57,18 +57,23 @@ RUN(){
HELP
else
#check that it exists
docker rm $(docker ps -a -q --filter ancestor=starpu_test/$p:latest --format="{{.ID}}")
cp $p/Dockerfile .
echo "building";
docker build -t starpu_test/$p . > docker_results/docker_build_$p
rm ./Dockerfile
docker run starpu_test/$p > docker_results/docker_run_$p
docker rm $(docker stop $(docker ps -a -q --filter ancestor=starpu_test/$p:latest --format="{{.ID}}"))
echo "running";
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?
fi
}
if [ $g = 'help' ]
then
HELP
elif [ $g = 'check' ]
if [ $g = 'check' ]
then
GETPU
cp check.sh run.sh
......@@ -97,5 +102,6 @@ then
fi
fi
#Do for a particular test
else
HELP
fi
./run-test.sh: line 7: make: command not found
......@@ -27,6 +27,9 @@ WORKDIR /home/starpu
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
#So we don't run mpi as root
RUN useradd starpu
......@@ -35,4 +38,4 @@ RUN chmod +x ./run.sh
USER starpu
#run whatever the script gave us
CMD ["/bin/bash", "./run.sh"]
CMD ["sleep", "infinity"]
......@@ -36,7 +36,7 @@ RUN chmod +x ./run.sh
USER starpu
#run whatever the script gave us
CMD ["/bin/bash", "./run.sh"]
CMD ["sleep", "infinity"]
# Copy the script to compile and test starpu
#COPY
# Compile starpu and check
......
......@@ -5,4 +5,3 @@ 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 > ../configure_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