-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
66 lines (53 loc) · 1.95 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
64
65
66
FROM ubuntu:20.04
# Set working directory
WORKDIR /scratch
# Set environment variables
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=America/New_York
ENV HOME=/home
# Set default command to be the bash shell
ENTRYPOINT ["bash"]
# Install a few ubuntu dependencies
RUN apt-get update && \
apt install --fix-broken && \
apt-get install -y \
build-essential \
curl \
wget \
make \
gcc \
cmake \
libxml2-dev \
libxslt-dev \
libffi-dev \
git && \
apt install --fix-broken && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
mkdir /dependencies && \
dpkg -l > /dependencies/apt-get.lock
# pull the latest dorado executable
RUN cd $HOME && \
wget --quiet https://cdn.oxfordnanoportal.com/software/analysis/dorado-0.7.1-linux-x64.tar.gz && \
tar -xvf dorado-0.7.1-linux-x64.tar.gz && \
rm -rf dorado-0.7.1-linux-x64.tar.gz
# add the dorado files to $PATH
ENV PATH=$PATH:$HOME/dorado-0.7.1-linux-x64/bin:$HOME/dorado-0.7.1-linux-x64/lib:$HOME/dorado-0.7.1-linux-x64
# predownload dorado models so that dorado can basecall offline
RUN cd $HOME && dorado download
# Install everything else with Pixi:
# --------------------------------
# 1) copy the required dependency and configuration file into the image
COPY pyproject.toml $HOME/pyproject.toml
COPY pixi.lock $HOME/pixi.lock
# 2) install pixi
RUN cd $HOME && PIXI_ARCH=x86_64 curl -fsSL https://pixi.sh/install.sh | bash
# 3) make sure pixi and pixi installs are on the $PATH
ENV PATH=$PATH:$HOME/.pixi/bin
# 4) install everything else with pixi
RUN cd $HOME && pixi install --verbose --color=always --frozen && pixi clean cache --assume-yes
# 5) modify the shell config so that each container launches within the pixi env
RUN echo "export PATH=$PATH:$HOME/.pixi/envs/default/bin" >> $HOME/.bashrc
# 6) modify some nextflow environment variables
RUN echo "export NXF_CACHE_DIR=/scratch" >> $HOME/.bashrc
RUN echo "export NXF_HOME=/scratch" >> $HOME/.bashrc