forked from Aquila-Network/aquila
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfileBig
41 lines (30 loc) · 1.05 KB
/
DockerfileBig
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
# start a new build stage
FROM ubuntu:latest as builder
# set work directory
ENV ROOT_DIR /home/root
WORKDIR $ROOT_DIR
# install aquiladb
RUN apt update && apt install -y curl && \
curl -s -L https://raw.githubusercontent.com/Aquila-Network/AquilaDB/master/install.sh | /bin/bash -s -- -m 0
# start a new runner stage
FROM ubuntu:latest as runner
# set work directory
ENV ROOT_DIR /home/root
WORKDIR $ROOT_DIR
RUN echo "$ROOT_DIR"
# copy required files from builder stage
COPY --from=builder $ROOT_DIR/env $ROOT_DIR/env
COPY --from=builder $ROOT_DIR/adb $ROOT_DIR/adb
COPY --from=builder /ossl /ossl
# preperations
ENV PATH="$ROOT_DIR/env/bin:$PATH"
WORKDIR $ROOT_DIR
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# install and start demon
RUN export DEBIAN_FRONTEND=noninteractive && mkdir -p /data && apt update && \
apt install -y python3 libgomp1 libblas-dev liblapack-dev && \
printf "#!/bin/bash\nsource env/bin/activate && cd adb/src && \
python3 index.py" > /bin/init.sh && chmod +x /bin/init.sh
# expose port
EXPOSE 5001
ENTRYPOINT ["init.sh"]