Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Commit

Permalink
Add pytorch dependencies to CI Dockerfile and enable test (#503)
Browse files Browse the repository at this point in the history
  • Loading branch information
yf225 authored Jun 12, 2022
1 parent b47da7b commit ef6df24
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions docker/unittest.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,18 @@ RUN source python3.9-env/bin/activate && pip install --upgrade pip \
tqdm scipy numba pulp tensorstore prospector yapf coverage cmake \
pybind11 ray[default] matplotlib

# Install PyTorch dependencies
RUN git clone https://github.com/pytorch/functorch /functorch
RUN source python3.7-env/bin/activate \
&& pip install torch torchdistx --pre --extra-index-url https://download.pytorch.org/whl/nightly/cpu \
&& pushd /functorch && python setup.py install && popd
RUN source python3.8-env/bin/activate \
&& pip install torch torchdistx --pre --extra-index-url https://download.pytorch.org/whl/nightly/cpu \
&& pushd /functorch && python setup.py install && popd
RUN source python3.9-env/bin/activate \
&& pip install torch torchdistx --pre --extra-index-url https://download.pytorch.org/whl/nightly/cpu \
&& pushd /functorch && python setup.py install && popd

# We determine the CUDA version at `docker build ...` phase
ARG JAX_CUDA_VERSION=11.1
COPY scripts/install_cuda.sh /install_cuda.sh
Expand Down
2 changes: 1 addition & 1 deletion docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ To enable Alpa for PyTorch, install the following dependencies:
# Install nightly version of torch and torchdistx
pip3 uninstall -y torch torchdistx
pip install torchdistx --pre --extra-index-url https://download.pytorch.org/whl/nightly/cpu
pip install torch torchdistx --pre --extra-index-url https://download.pytorch.org/whl/nightly/cpu
# Build functorch from source
git clone https://github.com/pytorch/functorch
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit ef6df24

Please sign in to comment.