Skip to content

Commit

Permalink
Update for MXNet 2 Alpha (dmlc#1546)
Browse files Browse the repository at this point in the history
  • Loading branch information
leezu authored Apr 19, 2021
1 parent 3496f40 commit e52967c
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 19 deletions.
12 changes: 5 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,18 @@ See our documents at https://nlp.gluon.ai/master/index.html.


# Installation
First of all, install the latest MXNet. You may use the following commands:
First of all, install the MXNet 2 release such as MXNet 2 Alpha. You may use the
following commands:

```bash
# Install the version with CUDA 10.1
python3 -m pip install -U --pre "mxnet-cu101>=2.0.0b20210121" -f https://dist.mxnet.io/python

# Install the version with CUDA 10.2
python3 -m pip install -U --pre "mxnet-cu102>=2.0.0b20210121" -f https://dist.mxnet.io/python
python3 -m pip install -U --pre "mxnet-cu102>=2.0.0a"

# Install the version with CUDA 11
python3 -m pip install -U --pre "mxnet-cu110>=2.0.0b20210121" -f https://dist.mxnet.io/python
python3 -m pip install -U --pre "mxnet-cu110>=2.0.0a"

# Install the cpu-only version
python3 -m pip install -U --pre "mxnet>=2.0.0b20210121" -f https://dist.mxnet.io/python
python3 -m pip install -U --pre "mxnet>=2.0.0a"
```


Expand Down
16 changes: 8 additions & 8 deletions docs/install/install-include.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ Select your preferences and run the install command.

.. code-block:: bash
# Install Apache MXNet (incubating) (Disclaimer: This is an unreleased nightly build and is used for the purpose of development).
python3 -m pip install -U --pre "mxnet>=2.0.0" -f https://dist.mxnet.io/python
# Install Apache MXNet (incubating) 2 Alhpa or newer.
python3 -m pip install -U --pre "mxnet>=2.0.0a"
# Install GluonNLP
git clone https://github.com/dmlc/gluon-nlp.git
Expand All @@ -68,10 +68,10 @@ Select your preferences and run the install command.

.. code-block:: bash
# Install Apache MXNet (incubating) (Disclaimer: This is an unreleased nightly build and is used for the purpose of development).
# Install Apache MXNet (incubating) 2 Alhpa or newer.
# Here we assume CUDA 10.2 is installed. You can change the number
# according to your own CUDA version, e.g., cu101, cu110
python3 -m pip install -U --pre "mxnet-cu102>=2.0.0" -f https://dist.mxnet.io/python
python3 -m pip install -U --pre "mxnet-cu102>=2.0.0a"
# Install GluonNLP
git clone https://github.com/dmlc/gluon-nlp.git
Expand All @@ -84,8 +84,8 @@ Select your preferences and run the install command.

.. code-block:: bash
# Install Apache MXNet (incubating) (Disclaimer: This is an unreleased nightly build and is used for the purpose of development).
python3 -m pip install -U --pre "mxnet>=2.0.0" -f https://dist.mxnet.io/python
# Install Apache MXNet (incubating) 2 Alhpa or newer.
python3 -m pip install -U --pre "mxnet>=2.0.0a"
# Install GluonNLP
git clone https://github.com/dmlc/gluon-nlp.git
Expand All @@ -96,10 +96,10 @@ Select your preferences and run the install command.

.. code-block:: bash
# Install Apache MXNet (incubating) (Disclaimer: This is an unreleased nightly build and is used for the purpose of development).
# Install Apache MXNet (incubating) 2 Alhpa or newer.
# Here we assume CUDA 10.2 is installed. You can change the number
# according to your own CUDA version, e.g., cu100, cu101
python3 -m pip install -U --pre "mxnet-cu102>=2.0.0" -f https://dist.mxnet.io/python
python3 -m pip install -U --pre "mxnet-cu102>=2.0.0a"
# Install GluonNLP
git clone https://github.com/dmlc/gluon-nlp.git
Expand Down
4 changes: 2 additions & 2 deletions tools/docker/gluon_nlp_job.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ git fetch origin $SOURCE_REF:working
git checkout working

if [ $DEVICE == "cpu" ]; then
python3 -m pip install -U --quiet --pre "mxnet>=2.0.0b20210121" -f https://dist.mxnet.io/python --user
python3 -m pip install -U --quiet --pre "mxnet>=2.0.0b20210121" --user
else
# Due to the issue in https://forums.aws.amazon.com/thread.jspa?messageID=953912
# We need to manually configure the shm to ensure that Horovod is runnable.
# The reason that we need a larger shm is described in https://github.com/NVIDIA/nccl/issues/290
umount shm
mount -t tmpfs -o rw,nosuid,nodev,noexec,relatime,size=2G shm /dev/shm
sudo python3 -m pip uninstall --quiet mxnet-cu102
python3 -m pip install -U --quiet --pre "mxnet-cu102>=2.0.0b20210121" -f https://dist.mxnet.io/python/cu102 --user
python3 -m pip install -U --quiet --pre "mxnet-cu102>=2.0.0a" --user
fi

python3 -m pip install --quiet -e .[extras,dev]
Expand Down
2 changes: 1 addition & 1 deletion tools/docker/ubuntu18.04-cpu.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ RUN bash /install/install_python_packages.sh
RUN bash /install/install_tvm_cpu.sh

# Install MXNet
RUN python3 -m pip install -U --pre "mxnet>=2.0.0b20210121" -f https://dist.mxnet.io/python --user
RUN python3 -m pip install -U --pre "mxnet>=2.0.0a" --user

# Install PyTorch
RUN python3 -m pip install "torch==1.7.1+cpu" torchvision -f https://download.pytorch.org/whl/torch_stable.html
Expand Down
2 changes: 1 addition & 1 deletion tools/docker/ubuntu18.04-gpu.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ RUN bash /install/install_python_packages.sh
RUN bash /install/install_tvm_gpu.sh

# Install MXNet
RUN python3 -m pip install -U --pre "mxnet-cu102>=2.0.0b20210121" -f https://dist.mxnet.io/python --user
RUN python3 -m pip install -U --pre "mxnet-cu102>=2.0.0a" --user

# Install PyTorch
RUN python3 -m pip install "torch==1.8.1+cu102" torchvision -f https://download.pytorch.org/whl/torch_stable.html
Expand Down

0 comments on commit e52967c

Please sign in to comment.