-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
58 lines (46 loc) · 1.59 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
FROM node:22-bullseye
SHELL ["/bin/bash", "-c"]
RUN apt update -y && apt upgrade -y && apt install -y curl opam python3 python3-pip
# RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash
# RUN source ~/.bashrc
# RUN nvm install 22
WORKDIR /app
RUN opam init -y --disable-sandboxing
# RUN eval "$(opam env)"
RUN opam update -y
# RUN eval "$(opam env)"
RUN opam upgrade -y
RUN opam switch create . ocaml-base-compiler -y
# RUN eval "$(opam env)"
# RUN opam install -y ocaml-lsp-server odoc ocamlformat utop dune ounit2
RUN opam install -y dune ounit2
# RUN eval "$(opam env)"
# RUN echo "eval $(opam env)" >> ~/.bashrc
# RUN source ~/.bashrc
# ENV OPAM_ENV="${opam env}"
# COPY ./opam-env-setter.sh /app
# RUN chmod +x opam-env-setter.sh
# RUN ./opam-env-setter.sh
ENV OPAM_SWITCH_PREFIX="/app/_opam"
ENV CAML_LD_LIBRARY_PATH="/app/_opam/lib/stublibs:/app/_opam/lib/ocaml/stublibs:/app/_opam/lib/ocaml"
ENV OCAML_TOPLEVEL_PATH="/app/_opam/lib/toplevel"
ENV MANPATH=":/app/_opam/man"
ENV PATH="/app/_opam/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
RUN npm install -g typescript typescript-language-server tslib
COPY package.json /app
RUN npm install -y
RUN pip install openai numpy scikit-learn
COPY . /app
WORKDIR /app/targets/ocaml/todo
RUN dune build; exit 0
WORKDIR /app/targets/ocaml/playlist
RUN dune build; exit 0
WORKDIR /app/targets/ocaml/passwords
RUN dune build; exit 0
WORKDIR /app/targets/ocaml/booking
RUN dune build; exit 0
WORKDIR /app/targets/ocaml/emojipaint
RUN dune build; exit 0
WORKDIR /app
RUN npm run build
CMD ["node", "dist/runner.js"]