FROM python:3.7-slim

WORKDIR /root

COPY ./requirements.txt /root/requirements.txt

ENV PYTHONIOENCODING=utf-8
ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'

RUN apt-get update &&\
    apt-get install -y build-essential curl wget nodejs

RUN pip install --upgrade pip &&\
    pip install -r requirements.txt

ENV PATH="/root/julia/bin:${PATH}"
RUN wget https://julialang-s3.julialang.org/bin/linux/x64/1.5/julia-1.5.3-linux-x86_64.tar.gz &&\
    mkdir julia &&\
    tar xf julia-1.5.3-linux-x86_64.tar.gz -C julia --strip-components 1 &&\
    rm -rf julia-1.5.3-linux-x86_64.tar.gz &&\
    julia -e 'import Pkg; Pkg.add("JSON");'

CMD ["tail", "-f", "/dev/null"]

FROM python:3.7-slim

WORKDIR /root

COPY ./requirements.txt /root/requirements.txt

ENV PYTHONIOENCODING=utf-8
ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'

RUN apt-get update &&\
    apt-get install -y build-essential curl wget nodejs gnupg

# Install Julia using the Jill installer script to make sure we get the proper version for this platform
ENV PATH="/usr/local/bin:${PATH}"
RUN pip install jill &&\
    jill install 1.5.3 --upstream Official --confirm &&\
    julia -e 'import Pkg; Pkg.add("JSON");'

CMD ["tail", "-f", "/dev/null"]

Modify code runner Dockerfile to support ARM architecture
Modify code runner Dockerfile to support ARM architecture

Most of the code runner dockerfile was platform agnostic, but the Julia
installation was using a binary for x86_64 specifically.

I first re-wrote the docker file to use `$(uname -m)` to check the
platform, but the quoting and escaping in the RUN commands were a big
mess. Luckily there's a python tool called Jill which handles installing
Julia from the command line:
https://github.com/abelsiqueira/jill
