From b584c79a0885867d0cd1805344acff77568fa686 Mon Sep 17 00:00:00 2001 From: Chaskiel Grundman Date: Sun, 2 Aug 2015 22:04:56 -0400 Subject: [PATCH] Update Dockerfiles master now has 2 dockerfiles, one targeting 122 with C0, and one not Apply updates (fewer RUN lines, do not fetch autodriver from github) to both of them. --- autodriver/Dockerfile_122 | 32 +++++++++++++++++++++++ autodriver/Dockerfile_ubuntu | 24 ++++++++++++++++++ vmms/Dockerfile_122 | 49 ------------------------------------ vmms/Dockerfile_ubuntu | 34 ------------------------- 4 files changed, 56 insertions(+), 83 deletions(-) create mode 100644 autodriver/Dockerfile_122 create mode 100644 autodriver/Dockerfile_ubuntu delete mode 100644 vmms/Dockerfile_122 delete mode 100644 vmms/Dockerfile_ubuntu diff --git a/autodriver/Dockerfile_122 b/autodriver/Dockerfile_122 new file mode 100644 index 00000000..51a1eaa8 --- /dev/null +++ b/autodriver/Dockerfile_122 @@ -0,0 +1,32 @@ +# Autolab - autograding docker image + +FROM ubuntu:14.04 +MAINTAINER Mihir Pandya + +RUN apt-get update && apt-get install -y build-essential wget python + +# Install autodriver +WORKDIR /home +RUN useradd autolab && useradd autograde +RUN mkdir autolab autograde output && chown autolab:autolab autolab output && chown autograde:autograde autograde +ADD . /home/autodriver +WORKDIR /home/autodriver +RUN make clean && make && install -c -o root -g root -m 4755 autodriver /usr/bin/autodriver && install -c -m 755 autograde_wrapper.py /usr/bin/autograde_wrapper && cp cc0wrap.sh /usr/bin/cc0 && chmod +x /usr/bin/cc0 + +ENTRYPOINT ["/usr/bin/autograde_wrapper"] + +# Install C0 +WORKDIR /home +RUN wget http://c0.typesafety.net/dist/cc0-v0440-linux3.18.1-64bit-bin.tgz +RUN tar -C /usr/local -xvzf cc0-* +WORKDIR /usr/local/cc0 +RUN bin/cc0 -d doc/src/exp.c0 doc/src/exp-test.c0 +#RUN ./a.out + +# Clean up +WORKDIR /home +RUN apt-get remove -y wget && apt-get -y autoremove +RUN rm -rf autodriver cc0* + +# Check installation +RUN ls -l /home && which autodriver && which cc0 diff --git a/autodriver/Dockerfile_ubuntu b/autodriver/Dockerfile_ubuntu new file mode 100644 index 00000000..dbb40213 --- /dev/null +++ b/autodriver/Dockerfile_ubuntu @@ -0,0 +1,24 @@ +# Autolab - autograding docker image + +FROM ubuntu:14.04 +MAINTAINER Mihir Pandya + +RUN apt-get update && apt-get install -y build-essential wget python + +# Install autodriver +WORKDIR /home +RUN useradd autolab && useradd autograde +RUN mkdir autolab autograde output && chown autolab:autolab autolab output && chown autograde:autograde autograde +ADD . /home/autodriver +WORKDIR /home/autodriver +RUN make clean && make && install -c -o root -g root -m 4755 autodriver /usr/bin/autodriver && install -c -m 755 autograde_wrapper.py /usr/bin/autograde_wrapper + +ENTRYPOINT ["/usr/bin/autograde_wrapper"] + +# Clean up +WORKDIR /home +RUN apt-get remove -y wget && apt-get -y autoremove +RUN rm -rf autodriver + +# Check installation +RUN ls -l /home && which autodriver diff --git a/vmms/Dockerfile_122 b/vmms/Dockerfile_122 deleted file mode 100644 index f021598d..00000000 --- a/vmms/Dockerfile_122 +++ /dev/null @@ -1,49 +0,0 @@ -# Autolab - autograding docker image - -FROM ubuntu:14.04 -MAINTAINER Mihir Pandya - -# Install necessary packages -RUN apt-get update -RUN apt-get install -y gcc -RUN apt-get install -y make -RUN apt-get install -y build-essential -RUN apt-get install -y wget -RUN apt-get install -y git - -# Install autodriver -WORKDIR /home -RUN useradd autolab -RUN useradd autograde -RUN mkdir autolab autograde output -RUN chown autolab:autolab autolab -RUN chown autolab:autolab output -RUN chown autograde:autograde autograde -RUN git clone https://github.com/autolab/Tango.git -WORKDIR Tango/autodriver -RUN make clean && make -RUN cp autodriver /usr/bin/autodriver -RUN chmod +s /usr/bin/autodriver - -# Install C0 -WORKDIR /home -RUN wget http://c0.typesafety.net/dist/cc0-v0440-linux3.18.1-64bit-bin.tgz -RUN tar -xvzf cc0-* -WORKDIR /home/cc0 -RUN bin/cc0 -d doc/src/exp.c0 doc/src/exp-test.c0 -RUN ./a.out -RUN cp bin/cc0 /usr/bin/cc0 - -# Clean up -WORKDIR /home -RUN apt-get remove -y git -RUN apt-get remove -y wget -RUN apt-get -y autoremove -RUN rm -rf Tango/ -RUN rm -f cc0-* -RUN rm -rf cc0/ - -# Check installation -RUN ls -l /home -RUN which autodriver -RUN which cc0 \ No newline at end of file diff --git a/vmms/Dockerfile_ubuntu b/vmms/Dockerfile_ubuntu deleted file mode 100644 index e9053445..00000000 --- a/vmms/Dockerfile_ubuntu +++ /dev/null @@ -1,34 +0,0 @@ -# Autolab - autograding docker image - -FROM ubuntu:14.04 -MAINTAINER Mihir Pandya - -RUN apt-get update -RUN apt-get install -y gcc -RUN apt-get install -y make -RUN apt-get install -y build-essential - -# Install autodriver -WORKDIR /home -RUN useradd autolab -RUN useradd autograde -RUN mkdir autolab autograde output -RUN chown autolab:autolab autolab -RUN chown autolab:autolab output -RUN chown autograde:autograde autograde -RUN apt-get install -y git -RUN git clone https://github.com/autolab/Tango.git -WORKDIR Tango/autodriver -RUN make clean && make -RUN cp autodriver /usr/bin/autodriver -RUN chmod +s /usr/bin/autodriver - -# Clean up -WORKDIR /home -RUN apt-get remove -y git -RUN apt-get -y autoremove -RUN rm -rf Tango/ - -# Check installation -RUN ls -l /home -RUN which autodriver \ No newline at end of file