-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
63 lines (44 loc) · 1.74 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
59
60
61
62
63
###################
# STAGE 1: builder
###################
# Build currently doesn't work on > Java 11 (i18n utils are busted) so build on 8 until we fix this
FROM debian:stable-slim as builder
WORKDIR /app
ENV FC_LANG en-US
ENV LC_CTYPE en_US.UTF-8
ENV PATH="/root/.cargo/bin:/opt/miniconda/bin:/opt/miniconda/envs/biomedgps/bin:${PATH}"
# bash: various shell scripts
# wget: installing lein
# git: ./bin/version
# make: backend building
# gettext: translations
RUN apt-get update && apt-get install -y coreutils bash git wget make gettext curl gcc g++ libssl-dev pkg-config
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
RUN wget -O miniconda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && \
bash miniconda.sh -b -p /opt/miniconda && \
rm miniconda.sh
RUN conda create -n biomedgps nodejs=16.13.1
RUN npm install -g [email protected]
# Add the rest of the source
ADD . .
# Fetch all submodule
RUN cd studio && git submodule update --init --recursive
RUN cd studio && yarn && yarn build:embed
RUN make build-biomedgps
# ###################
# # STAGE 2: runner
# ###################
FROM debian:stable-slim as runner
ENV PATH="$PATH"
ENV PYTHONDONTWRITEBYTECODE=1
ENV FC_LANG en-US
ENV LC_CTYPE en_US.UTF-8
LABEL org.opencontainers.image.source = "https://github.com/yjcyxky/biomedgps"
RUN apt-get update && apt-get install -y coreutils bash git wget
WORKDIR /data
# Customized
COPY --from=builder /app/target/release/biomedgps /usr/local/bin/biomedgps
COPY --from=builder /app/target/release/biomedgps-cli /usr/local/bin/biomedgps-cli
RUN chmod +x /usr/local/bin/biomedgps && chmod +x /usr/local/bin/biomedgps-cli
# Run it
ENTRYPOINT ["biomedgps", "--help"]