Skip to content

Instantly share code, notes, and snippets.

@partrita
Created September 21, 2024 08:25
Show Gist options
  • Save partrita/01982512852dc236d23683eb9af488ae to your computer and use it in GitHub Desktop.
Save partrita/01982512852dc236d23683eb9af488ae to your computer and use it in GitHub Desktop.
ffcv micromamba Docker
FROM mambaorg/micromamba:jammy-cuda-12.1.0
# mambaorg/micromamba defaults to a non-root user. Add a "USER root" to install packages as root:
USER root
#Install ubuntu packages
RUN apt-get update && DEBIAN_FRONTEND=noninteractive \
apt-get install -y --no-install-recommends \
build-essential \
git \
curl \
ca-certificates \
wget \
# FFCV Libraries
pkg-config \
libturbojpeg0-dev \
libopencv-dev && \
# Remove the effect of `apt-get update`
apt-get clean && \
rm -rf /var/lib/apt/lists/*
#Create workdir
WORKDIR /app
COPY environment.yml .
# Create the environment:
RUN micromamba install --yes --name base -f environment.yml
RUN micromamba clean --all --yes
# Activate the environment,
ARG MAMBA_DOCKERFILE_ACTIVATE=1
RUN git clone https://github.com/libffcv/ffcv.git
RUN pip install --no-cache ffcv
name: base
channels:
- bioconda
- conda-forge
dependencies:
- python=3.9
- pip
- pyyaml
- cupy
- pkg-config
- libjpeg-turbo
- opencv
- numba
- pip:
- torch
- torchvision
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment