Skip to content

Instantly share code, notes, and snippets.

@chasemc
Created October 2, 2024 21:37
Show Gist options
  • Save chasemc/0fb016c97762c1da9f1c0131e271bae5 to your computer and use it in GitHub Desktop.
Save chasemc/0fb016c97762c1da9f1c0131e271bae5 to your computer and use it in GitHub Desktop.
# Start with Ubuntu base image
FROM ubuntu:22.04
# Set environment variables to prevent prompts during package installation
ENV DEBIAN_FRONTEND=noninteractive
# Update and install dependencies
RUN apt-get update && apt-get install -y \
software-properties-common \
build-essential \
curl \
wget \
zstd \
gzip \
libbz2-dev \
libssl-dev \
libffi-dev \
zlib1g-dev \
liblzma-dev \
&& rm -rf /var/lib/apt/lists/*
# Add deadsnakes PPA for Python 3.12
RUN add-apt-repository ppa:deadsnakes/ppa && \
apt-get update && apt-get install -y \
python3.12 \
python3.12-dev \
&& rm -rf /var/lib/apt/lists/*
# Manually install pip for Python 3.12
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \
python3.12 get-pip.py && \
rm get-pip.py
# Add Python 3.12 to PATH and force link creation
RUN ln -sf /usr/bin/python3.12 /usr/local/bin/python && \
ln -sf /usr/bin/python3.12 /usr/bin/python && \
ln -sf /usr/bin/python3.12 /usr/bin/python3
# Install required Python packages
RUN python3.12 -m pip install pandas textdistance pyarrow
# Verify installation of Python and libraries
RUN python3.12 -m pip show pandas textdistance pyarrow
FROM mambaorg/micromamba:1.5.10 AS micromamba
# docker build -t chasemc2/text:0.0.1 .
COPY env.yaml /tmp/env.yaml
RUN micromamba install -y -n base -f /tmp/env.yaml && \
micromamba clean --all --yes
USER $MAMBA_USER
ARG MAMBA_DOCKERFILE_ACTIVATE=1
name: sgnf-hmmer
channels:
- conda-forge
- bioconda
- defaults
dependencies:
- conda-forge::python==3.12
- conda-forge::gzip
- pandas
- textdistance
- pyarrow
- zstandard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment