How to build and test a Docker container for your ICCMA19 solver Install and run Docker This document is a step-to-step guide for packaging your solver to be submitted to International Competition on Computational Models of Argumentation (ICCMA 2019) into a Docker container. First, create a Docker Cloud account here: https://cloud.docker.com In the following of this manual we consider as DOCKER_ID the name iccma19. Then, sign in and 1. Click on “Create Repository”. 2. Choose a name for the Docker repository of your solver (e.g., “YOUR_SOLVER_REPOSITORY”) and a description for your repository, select “public”, and then click on “Create”. In the following, we suppose the chosen solver name is conarg. See Figure 1. Figure 1: create the repository for your solver.
7
Embed
How to build and test a Docker container for your ICCMA19 ... · The first one can be used to locally remove a Docker image (fbff44780fae is the image ID you can obtain with the docker
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
2. ChooseanamefortheDockerrepositoryofyoursolver(e.g.,“YOUR_SOLVER_REPOSITORY”)and a description for your repository, select “public”, and then click on “Create”. In thefollowing,wesupposethechosensolvernameisconarg.SeeFigure1.
SolverDockerizationIn this section we describe how to create a Docker container with your solver. First, create adirectory“SOLVER_DIR”,somewhereonyourmachine.Thisdirectoryneedstocontainatleast:
the required input/output interface (for more details please check the document athttp://iccma19.dmi.unipg.it/res/SolverRequirements.pdf).Ifyoursolvernativelyimplementssuchaninterface,thescriptatbullet3hastodirectlycallyoursolverandnotthisscript.
5. A file named “Dockerfile” (requiring Alpine Linux for running the solver, and definingwrapper.sh,bullet3,astheentry-pointofexecution).
WhenyoubuildanimagebyusingthisDockerfile,theassembledpackagewillcontainaminimaldistributionof Linux (Alpine Linux: https://alpinelinux.org), andall the files at bullets 1-5. If thesolveriscomposedbyseveralexecutables/files,addallofthemtothisdirectory.PleasetrytouseAlpine Linux: if you use a different Linux distribution, e.g., Ubuntu, the final image size willconsiderablyincrease(from~10to~80GB).Thefollowingscreenshotshowstheminimalcontentofthe“SOLVER_DIR”directory(conarg_dir inthisexample).Asrunningexample,wewillbuildacontainerforconarg,whichrepresentsaninstantiationofthe“YOUR_SOLVER”stringinthisguide.
Then,besuretobeinside“SOLVER_DIR”,andtype
dockerbuild-tDOCKER_ID/YOUR_SOLVER_REPOSITORY.whereYOUR_SOLVER_REPOSITORYisthenameoftherepositoryyouhavecreatedinthisprevioussection,and“.”(oralternatively“./”)isthecurrentfolderthatcontainsallthefiles.Inthisexample,DOCKER_ID/YOUR_SOLVER_REPOSITORYwillthencorrespondtoiccma19/conarg.This command builds aDocker image containing everything is inside the current directory. ThefollowingscreenshotshowswhathappenswhenthiscommandisexecutedtobuildanimageoftheConArgsolver.
Afterwards, check if the image "DOCKERID/YOUR_SOLVER_REPOSITORY" has been successfullycreated(theresultforthisrunningexampleisshowninthefollowingscreenshot.dockerimages
Inordertotestifyourdockerizedsolverworksfine,youfirstneedasecondcontainerstoringsometest-frameworks from ICCMA 2017. The container iccma19/test_frameworks stores twoframeworks:admbuster_1000.apxandadmbuster_1000.tgf.Pleasetypethefollowingcommandsoneaftertheother(respectivelyretrievingfromarepositoryandthenrunningthissecondcontainer):dockerpulliccma19/test_frameworks dockerrun-d--nametest_frameworksiccma19/test_frameworksThese commands pull a new container and run it in background (-d option), with nametest_frameworks.Now it is possible to launch your dockerized solver on one of the framework instances intest_frameworks;use,forinstance,thecommand
dockerrun--volumes-fromtest_frameworksDOCKER_ID/YOUR_SOLVER_REPOSITORY600-f/test_frameworks/admbuster_1000.apx-foapx-pDC-PR-ac408to check the credulous acceptance of argument c408 with the preferred semantics on fileadmbuster_1000.apx. The first parameter after DOCKER_ID/YOUR_SOLVER_REPOSITORY hasalways to be the timeout in seconds (600 seconds in this example). The result is shown in thefollowingscreenshot.
Please refer to http://iccma19.dmi.unipg.it/SolverRequirements.pdf for detailed information oncomments. The iccma19/test_frameworks image also contains two modification files(admbuster_1000.apxmandadmbuster_1000.tgfm),inordertotestalsodynamicsolvers.Finally,youcanpushtheimagetoyourpersonalrepository:dockerpushDOCKER_ID/YOUR_SOLVER_REPOSITORYTheresultisinthefollowingscreenshot:
A link to a public repository, as iccma19/conarg in this example, is what theparticipants need to clearly state in their solver description (submitted throughEasyChair),andrepresentsmandatoryinformationforasolversubmission.Allthefilesusedinthisguidetodockerizeconarg(i.e.,conarg_dir)canbefoundatthefollowinglink: