Skip to content

Commit

Permalink
judge2 support for Docker; #165
Browse files Browse the repository at this point in the history
  • Loading branch information
quantum5 committed Jul 6, 2016
1 parent 565b430 commit c465a08
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions Dockerfile
Expand Up @@ -4,13 +4,11 @@ MAINTAINER Quantum <quantum@dmoj.ca>
RUN groupadd -r judge && useradd -r -g judge judge
RUN apt-get -y update && apt-get install -y --no-install-recommends python python2.7-dev python3 gcc g++ wget file && apt-get clean
RUN wget -q --no-check-certificate -O- https://bootstrap.pypa.io/get-pip.py | python && \
pip install --no-cache-dir pika watchdog cython ansi2html && \
pip install --no-cache-dir pyyaml watchdog cython ansi2html termcolor && \
rm -rf ~/.cache
RUN mkdir /problems

COPY . /judge
WORKDIR /judge

RUN python cptbox/build_cptbox.py redist && \
python checkers/build_checker.py redist && \
rm -rf checkers/build/ cptbox/build/
RUN env DMOJ_REDIST=1 python setup.py develop && rm -rf build/
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -26,7 +26,7 @@ def build_extensions(self):
self.compiler.compile_options += ['/Ox', '/W4', '/EHsc', '/GL', '/MT']
self.compiler.ldflags_shared += ['/OPT:REF,ICF', '/LTCG']
else:
if os.uname()[4].startswith('arm') or 'redist' in sys.argv:
if os.uname()[4].startswith('arm') or os.environ.get('DMOJ_REDIST'):
extra_compile_args = ['-O3']
else:
extra_compile_args = ['-march=native', '-O3']
Expand Down

0 comments on commit c465a08

Please sign in to comment.