-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathlocal-cli.dockerfile
47 lines (35 loc) · 1.55 KB
/
local-cli.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
# THIS DOCKERFILE RUNS THE CLI with local mode.
# For future reference, in case this turns out to be slow.
# https://www.lpalmieri.com/posts/fast-rust-docker-builds/
# https://dev.to/rogertorres/first-steps-with-docker-rust-30oi
FROM docker.io/rust AS build
WORKDIR /app
COPY ./fastq2comp/ ./fastq2comp/
COPY ./server/ ./server/
COPY ./frontend/ ./frontend/
COPY ./cli/ ./cli/
COPY ./Cargo.toml ./Cargo.toml
COPY ./Cargo.lock ./Cargo.lock
COPY ./build-release.sh ./build-release.sh
RUN apt-get update && \
apt-get install -y musl-tools && \
bash -x ./build-release.sh && \
tar -xvf release/librarian.tar.gz
# Final image
FROM docker.io/r-base:latest
# Install R packages
RUN apt-get update && \
apt-get install -y pandoc libssl-dev libcurl4-openssl-dev libxml2-dev libfontconfig1-dev libharfbuzz-dev libfribidi-dev libfreetype-dev libpng-dev libtiff5-dev libjpeg-dev libcairo2-dev
RUN Rscript -e 'install.packages(c("tidyverse", "umap", "ggrastr", "pins", "rmarkdown"))'
WORKDIR /app
COPY --from=build /app/librarian_v1.2 ./
RUN mkdir /app/out
LABEL org.opencontainers.image.source https://github.com/DesmondWillowbrook/Librarian
ENTRYPOINT ["./librarian", "--local", "--raw", "--output-dir", "/app/out/"]
# example command to run this image:
# docker run \
# -v $(pwd):/app/in # volume mapping from host to container
# -v $(pwd)/out:/app/out # volume mapping from host to container
# -e RUST_LOG='trace' # set the log level to trace
# -t desmondwillowbrook/librarian-server # image name
# /app/in/RNA.example.fastq # path of file relative to mapped volume