-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
40 lines (31 loc) · 1.4 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
FROM ocaml/opam:ubuntu-22.04-ocaml-4.10
USER root
RUN apt-get update && apt-get install -y git python3.10 software-properties-common python3-pip cloc
RUN add-apt-repository ppa:deadsnakes/ppa
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.10 1
ENV HOME=/home/opam
WORKDIR ${HOME}
# Copy Pyinder Source Code
COPY Pyinder ${HOME}/Pyinder
RUN pip3 install --upgrade pip
RUN pip3 install GitPython
RUN (cd Pyinder ; pip3 install -r requirements.txt)
RUN pip3 install pyright==1.1.339 mypy==1.9.0 pytype==2024.4.11 numpy pandas matplotlib venn
RUN apt-get install -y python3.9
# Set up environemnt
RUN echo "alias pyinder='PYTHONPATH=${HOME}/Pyinder/..:\$PYTHONPATH python3 -m Pyinder.client.pyre'" >> /home/opam/.bashrc
RUN echo "export PYRE_BINARY=${HOME}/Pyinder/source/_build/default/main.exe" >> /home/opam/.bashrc
# Install opam packages
RUN opam init --disable-sandboxing
RUN opam install -y dune base64.3.5.0 core.v0.14.1 re2.v0.14.0 dune.2.9.1 yojson.1.7.0 ppx_deriving_yojson.3.6.1 ounit.2.2.4 menhir.20211230 lwt.5.5.0 ounit2-lwt.2.2.4 pyre-ast.0.1.8 mtime.1.3.0
RUN eval $(opam config env)
# Copy files
COPY configuration ${HOME}/configuration
COPY run ${HOME}/run
COPY eval ${HOME}/eval
RUN chmod +x ${HOME}/run/run.sh
RUN chmod +x ${HOME}/run/run_pyright.sh
RUN chmod +x ${HOME}/run/run_mypy.sh
RUN chmod +x ${HOME}/run/run_pyre.sh
RUN chmod +x ${HOME}/run/run_pytype.sh
CMD ["/bin/bash"]