Skip to content

Instantly share code, notes, and snippets.

@fauxneticien
Created March 28, 2023 23:56
Show Gist options
  • Save fauxneticien/85e203c876a9c81886dd564ce09eedac to your computer and use it in GitHub Desktop.
Save fauxneticien/85e203c876a9c81886dd564ce09eedac to your computer and use it in GitHub Desktop.
Dockerfile for fauxneticien/fairseq-asr image
# NVIDIA official container with CUDA 11.7 (note pytorch-cuda=11.7 in PyTorch install below)
# See https://docs.nvidia.com/deeplearning/frameworks/support-matrix/index.html
FROM nvcr.io/nvidia/pytorch:22.05-py3
# Update container PyTorch from 1.9 to 1.13.1
RUN conda install pytorch==1.13.1 \
torchvision==0.14.1 \
torchaudio==0.13.1 \
pytorch-cuda=11.7 \
-c pytorch \
-c nvidia
# Re-build Apex for newer version of PyTorch
WORKDIR /apex
RUN git clone https://github.com/NVIDIA/apex /apex && \
pip install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" \
--global-option="--deprecated_fused_adam" --global-option="--xentropy" \
--global-option="--fast_multihead_attn" ./
# Install dependencies not covered by fairseq's setup.py for some reason
RUN pip install soundfile \
editdistance \
tensorboardX \
timm
WORKDIR /fairseq
RUN git clone https://github.com/facebookresearch/fairseq.git /fairseq && \
pip install --editable ./
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment