Skip to content

Commit

Permalink
fix: set pythonpath & demo conda install
Browse files Browse the repository at this point in the history
resolves #33
  • Loading branch information
kelly-sovacool committed Oct 23, 2024
1 parent 23d79d0 commit 0d2fb11
Show file tree
Hide file tree
Showing 3 changed files with 129 additions and 1 deletion.
2 changes: 1 addition & 1 deletion common/ccbr_ubuntu_base_20.04/Dockerfile
116 changes: 116 additions & 0 deletions common/ccbr_ubuntu_base_20.04/Dockerfile.v7
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
FROM ubuntu:20.04
LABEL maintainer "Vishal Koparde *(kopardev on GitHub)*"
LABEL github_handle="kopardev"

# build time variables
ARG BUILD_DATE="000000"
ENV BUILD_DATE=${BUILD_DATE}
ARG BUILD_TAG="000000"
ENV BUILD_TAG=${BUILD_TAG}
ARG REPONAME="000000"
ENV REPONAME=${REPONAME}

RUN mkdir -p /opt2 && mkdir -p /data2
ENV TZ=America/New_York
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

RUN apt update && apt-get -y upgrade
# Set the locale
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
locales build-essential cmake cpanminus && \
localedef -i en_US -f UTF-8 en_US.UTF-8 && \
cpanm FindBin Term::ReadLine

RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
bcftools \
bedops \
bedtools \
bowtie \
bowtie2 \
bwa \
bzip2 \
curl \
figlet \
g++ \
gcc \
gfortran \
git \
imagemagick \
libatlas-base-dev \
libblas-dev \
libboost-dev \
libbz2-dev \
libcurl4-openssl-dev \
libexpat1-dev \
libfreetype6-dev \
libgd-dev \
libgd-perl \
libgs-dev \
libgsl-dev \
libgsl0-dev \
libhtml-template-compiled-perl \
libicu-dev \
libjudy-dev \
liblapack-dev \
liblzma-dev \
libmysqlclient-dev \
libncurses-dev \
libopenmpi-dev \
libpng-dev \
librtmp-dev \
libssl-dev \
libtool \
libxml-libxml-debugging-perl \
libxml-opml-simplegen-perl \
libxml2-dev \
libxslt-dev \
make \
manpages-dev \
openjdk-8-jdk \
parallel \
pigz \
python2.7 \
python3-pip \
python3-dev \
rsync \
samtools \
unzip \
vim \
vcftools \
wget \
zlib1g \
zlib1g-dev \
zlibc

# Install conda and give write permissions to conda folder
RUN echo 'export PATH=/opt2/conda/bin:$PATH' > /etc/profile.d/conda.sh && \
wget --quiet "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh" -O ~/miniforge3.sh && \
/bin/bash ~/miniforge3.sh -b -p /opt2/conda && \
rm ~/miniforge3.sh && chmod 777 -R /opt2/conda/

# R, python, and other packages available in conda should be installed with mamba here.
# Specify all dependencies in environment.yml
COPY environment.yml /data2/
ENV CONDA_ENV=ccbr
RUN mamba env create -n ${CONDA_ENV} -f /data2/environment.yml && \
echo "conda activate ${CONDA_ENV}" > ~/.bashrc
ENV PATH="/opt2/conda/envs/${CONDA_ENV}/bin:$PATH"
ENV PYTHONPATH=""

# Fix python
RUN ln -s /opt2/conda/bin/python /usr/bin/python \
&& ln -s /usr/bin/python2.7 /usr/bin/python2

# cleanup etc
# Save Dockerfile in the docker
COPY Dockerfile /opt2/Dockerfile_${REPONAME}.${BUILD_TAG}
RUN chmod a+r /opt2/Dockerfile_${REPONAME}.${BUILD_TAG}
COPY argparse.bash /opt2
RUN chmod -R a+rx /opt2/argparse.bash
ENV PATH="/opt2/:$PATH"

RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
apt-get autoclean && \
apt-get autoremove -y && \
rm -rf /var/lib/{apt,dpkg,cache,log}/
WORKDIR /data2
12 changes: 12 additions & 0 deletions common/ccbr_ubuntu_base_20.04/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: ccbr
channels:
- conda-forge
- bioconda
- defaults
dependencies:
- argparse
- biopython
- numpy
- pandas
- pysam
- scipy

0 comments on commit 0d2fb11

Please sign in to comment.