-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dockerfile: install python, make cc0 work
install python2 so interface script can use #!/usr/bin/python Install all of C0's files, and use a wrapper shell script for cc0 so the compiler is always invoked with an absolute path
- Loading branch information
Showing
2 changed files
with
7 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,25 +3,24 @@ | |
FROM ubuntu:14.04 | ||
MAINTAINER Mihir Pandya <[email protected]> | ||
|
||
RUN apt-get update && apt-get install -y build-essential wget | ||
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 | ||
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 -xvzf cc0-* | ||
WORKDIR /home/cc0 | ||
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 | ||
RUN cp bin/cc0 /usr/bin/cc0 | ||
|
||
# Clean up | ||
WORKDIR /home | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/sh | ||
|
||
exec /usr/local/cc0/bin/cc0 $@ |