Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Parlai container #4868

Merged
merged 5 commits into from Nov 10, 2022
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
33 changes: 33 additions & 0 deletions Dockerfile
@@ -0,0 +1,33 @@
# Copyright (c) Meta, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
FROM nvidia/cuda:11.1.1-cudnn8-devel-ubuntu18.04

# Installing the required packages
RUN apt update -y
RUN apt install -y git curl

# Installing Anaconda
WORKDIR /root
RUN curl https://repo.anaconda.com/archive/Anaconda3-2021.05-Linux-x86_64.sh -o anaconda_installer.sh
RUN bash anaconda_installer.sh -b -p
ENV PATH="/root/anaconda3/bin:$PATH"

# Installing recommmended pre-requirements
RUN conda install pytorch torchvision torchaudio -c pytorch-lts -c nvidia
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we specify torch version? or just assume we work with highest torch number?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, good point. Should we set it to the same version as the install requirements?

RUN pip install spacy==3.2.4 tokenizers pandas transformers fairseq contractions boto3==1.17.95 botocore==1.20.95

# Configuring packages for English
RUN python -m spacy download en_core_web_sm
RUN echo "import nltk; nltk.download(\"stopwords\"); nltk.download(\"punkt\")" > nltk_dl_script.py
RUN python nltk_dl_script.py

# Download the ParlAI Github repo
RUN git clone https://github.com/facebookresearch/ParlAI.git ~/ParlAI

# Running ParlAI install
RUN cd ~/ParlAI && \
pip install -r requirements.txt && \
python setup.py develop

CMD ["parlai", "party"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😍