-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
50 lines (49 loc) · 1.29 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
FROM ubuntu:22.04
ENV HOME /root
WORKDIR $HOME
RUN apt update
# setup Node.js
RUN apt install -y npm curl
RUN npm install -g n
RUN n lts
# setup python3-venv
RUN apt install -y python3-venv
# build ruby 3.1.2-refgraph
RUN apt install -y \
autoconf \
bison \
clang \
libffi-dev \
libreadline-dev \
libssl-dev \
rbenv \
ruby
RUN echo 'eval "$(rbenv init -)"' >> $HOME/.bashrc
COPY . $HOME/ruby-refgraph
WORKDIR $HOME/ruby-refgraph
RUN autoconf
RUN autoreconf --install
RUN mkdir build
WORKDIR $HOME/ruby-refgraph/build
RUN CC=clang ../configure --prefix $(rbenv root)/versions/3.1.2-clang-refgraph --disable-install-doc
RUN make install
RUN rbenv global 3.1.2-clang-refgraph
# activate refgraph extensions
WORKDIR $HOME/ruby-refgraph/refgraph
RUN eval "$(rbenv init -)" && \
gem install bundler && \
bin/setup && \
bundle exec rake build && \
gem install pkg/refgraph-0.1.0.gem
# install benchmark dependencies
WORKDIR $HOME/ruby-refgraph/refgraph/benchmarks/babel
RUN npm install
# setup figure generator
WORKDIR $HOME/ruby-refgraph/refgraph/experiment
RUN python3 -m venv venv --upgrade-deps
RUN venv/bin/pip install matplotlib==3.6.1
# entrypoint
ENV RUBY_REFGRAPH_BENCHMARK_DIR $HOME/ruby-refgraph/refgraph/benchmarks
ENV RUBY_REFGRAPH_BENCHMARK_NO_PDFJS TRUE
WORKDIR $HOME
CMD /bin/bash