Skip to content

Commit

Permalink
updating dockerfile (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
mnabian authored May 2, 2023
1 parent baddbbf commit 61dcc2b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 21 deletions.
39 changes: 20 additions & 19 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,26 @@ RUN pip install --pre dgl -f https://data.dgl.ai/wheels/cu117/repo.html
RUN pip install --pre dglgo -f https://data.dgl.ai/wheels-test/repo.html
ENV DGLBACKEND=pytorch

ENV _CUDA_COMPAT_TIMEOUT=90

# Install custom onnx
# TODO: Find a fix to eliminate the custom build
# Forcing numpy update to over ride numba 0.56.4 max numpy constraint
COPY . /modulus/
RUN if [ -e "/modulus/deps/onnxruntime_gpu-1.14.0-cp38-cp38-linux_x86_64.whl" ]; then \
echo "Custom wheel exists, installing!" && \
pip install --force-reinstall /modulus/deps/onnxruntime_gpu-1.14.0-cp38-cp38-linux_x86_64.whl; \
else \
echo "No custom wheel present, skipping" && \
pip install numpy==1.22.4; \
fi
# cleanup of stage
RUN rm -rf /modulus/

# CI image
FROM builder as ci
RUN pip install tensorflow>=2.11.0 warp-lang>=0.6.0 black==22.10.0 interrogate==1.5.0 coverage==6.5.0 protobuf==3.20.0

# install libcugraphops and pylibcugraphops
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Etc/UTC
Expand All @@ -43,25 +63,6 @@ RUN mkdir -p /opt/cugraphops &&\

ENV PYTHONPATH="${PYTHONPATH}:/opt/cugraphops/lib/python3.8/site-packages"

ENV _CUDA_COMPAT_TIMEOUT=90

# Install custom onnx
# TODO: Find a fix to eliminate the custom build
# Forcing numpy update to over ride numba 0.56.4 max numpy constraint
COPY . /modulus/
RUN if [ -e "/modulus/deps/onnxruntime_gpu-1.14.0-cp38-cp38-linux_x86_64.whl" ]; then \
echo "Custom wheel exists, installing!" && \
pip install --force-reinstall /modulus/deps/onnxruntime_gpu-1.14.0-cp38-cp38-linux_x86_64.whl; \
else \
echo "No custom wheel present, skipping" && \
pip install numpy==1.22.4; \
fi
# cleanup of stage
RUN rm -rf /modulus/

# CI image
FROM builder as ci
RUN pip install tensorflow>=2.11.0 warp-lang>=0.6.0 black==22.10.0 interrogate==1.5.0 coverage==6.5.0 protobuf==3.20.0
COPY . /modulus/
RUN cd /modulus/ && pip install -e . && rm -rf /modulus/

Expand Down
4 changes: 2 additions & 2 deletions accompanying_licenses/all_licenses.txt
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,8 @@
"Version": "2022.9.2"
},
{
"License": "UNKNOWN",
"LicenseText": "UNKNOWN",
"License": "ISC",
"LicenseText": "Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/\nUpstream-Name: distro-info\nUpstream-Contact: Benjamin Drung <[email protected]>\n\nFiles: *\nCopyright: 2009-2018, Benjamin Drung <[email protected]>\n 2010-2011, Stefano Rivera <[email protected]>\nLicense: ISC\n\nFiles: shell/*-distro-info.in shell/distro-info-util.sh\nCopyright: 2012 Canonical Ltd.\nLicense: ISC\n\nLicense: ISC\n Permission to use, copy, modify, and/or distribute this software for any\n purpose with or without fee is hereby granted, provided that the above\n copyright notice and this permission notice appear in all copies.\n .\n THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\n REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\n AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\n INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\n LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\n OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\n PERFORMANCE OF THIS SOFTWARE.",
"Name": "distro-info",
"Version": "0.23ubuntu1"
},
Expand Down

0 comments on commit 61dcc2b

Please sign in to comment.