Skip to content

Commit

Permalink
Updated Applied dockerfile to build unifyai/ivy:latest as base
Browse files Browse the repository at this point in the history
  • Loading branch information
fspyridakos committed Mar 9, 2023
1 parent 2b8ff93 commit 6bd4cac
Showing 1 changed file with 1 addition and 46 deletions.
47 changes: 1 addition & 46 deletions docker/DockerfileApplied
Original file line number Diff line number Diff line change
Expand Up @@ -2,52 +2,7 @@ FROM ubuntu:20.04
WORKDIR /ivy
ARG CLI

# Install Docker CE CLI
RUN if [ "$CLI" = "True" ]; then apt-get update \
&& apt-get install -y apt-transport-https ca-certificates curl gnupg2 lsb-release \
&& curl -fsSL https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/gpg | apt-key add - 2>/dev/null \
&& echo "deb [arch=amd64] https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]') $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list \
&& apt-get update \
&& apt-get install -y docker-ce-cli; \
fi

ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y python3 python3-pip python3-tk && \
apt-get install -y libsm6 libxext6 libxrender-dev libgl1-mesa-glx && \
apt-get install -y python-opengl && \
apt-get install -y git && \
apt-get install -y rsync && \
apt-get install -y libusb-1.0-0 && \
apt-get install -y libglib2.0-0 && \
pip3 install --upgrade pip && \
pip3 install setuptools==58.5.3

RUN pip3 install torch -f https://download.pytorch.org/whl/torch_stable.html
RUN pip3 install --upgrade torch-scatter -f https://pytorch-geometric.com/whl

# Install Ivy Upstream
RUN git clone --progress --recurse-submodules https://github.com/unifyai/ivy --depth 1 && \
cd ivy && \
cat requirements/requirements.txt | grep -v "ivy-" | pip3 install --no-cache-dir -r /dev/stdin && \
cat requirements/optional.txt | grep -v "ivy-" | pip3 install --no-cache-dir -r /dev/stdin && \
python3 -m pip install --user -e . && \
cd ivy_tests/test_array_api && \
pip3 install --no-cache-dir -r requirements.txt

# Install local requirements
COPY requirements/requirements.txt .
RUN pip3 install --no-cache-dir -r requirements.txt

# Install local optional
COPY requirements/optional.txt .
RUN pip3 install --no-cache-dir -r optional.txt

COPY run_tests_CLI/test_dependencies.py .
RUN python3 test_dependencies.py -fp requirements.txt,optional.txt && \
rm -rf requirements.txt && \
rm -rf optional.txt && \
rm -rf test_dependencies.py
FROM unifyai/ivy:latest as base

COPY requirements/optional_applied.txt .
RUN pip3 install --no-cache-dir -r optional_applied.txt

0 comments on commit 6bd4cac

Please sign in to comment.