Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

Dockerfile 2.6 KB

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
  1. # Copyright (c) 2022, NVIDIA CORPORATION.
  2. # SPDX-License-Identifier: Apache-2.0
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. ARG BASE_IMAGE=nvcr.io/nvidia/clara/megamolbart_taining:nemo_1.11_rc1
  15. FROM ${BASE_IMAGE}
  16. ARG GITHUB_ACCESS_TOKEN
  17. ARG GITHUB_BRANCH
  18. ARG NEMO_BRANCH
  19. ARG NEMO_CHEM_HOME=/opt/nvidia/nemo_chem
  20. ARG NEMO_HOME=/opt/nvidia/nemo
  21. ARG CONDA_ENV=base
  22. ARG PACKAGE=0
  23. # Activating base environment
  24. RUN echo "source activate ${CONDA_ENV}" > /etc/bash.bashrc
  25. ENV TERM=xterm
  26. ## Installing dependencies and tools
  27. RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
  28. apt-get upgrade -y && \
  29. apt-get install -y \
  30. python-setuptools python-dev swig \
  31. wget git unzip tmux vim && \
  32. rm -rf /var/lib/apt/lists/*
  33. ## Setup - Install and upgrade additional packages
  34. # RUN pip install --upgrade numpy wandb
  35. # RUN pip install --upgrade einops
  36. COPY setup/conda/env.yml /tmp/env.yml
  37. RUN conda env update --name base -f /tmp/env.yml && conda clean -afy
  38. ## PySMILES
  39. RUN git clone https://github.com/MolecularAI/pysmilesutils.git --branch master /opt/pysmilesutils \
  40. && cd /opt/pysmilesutils; pip install .
  41. RUN git clone --branch ${GITHUB_BRANCH} \
  42. https://${GITHUB_ACCESS_TOKEN}@github.com/NVIDIA/MegaMolBART.git ${NEMO_CHEM_HOME}
  43. RUN cd ${NEMO_CHEM_HOME} && conda run -n ${CONDA_ENV} pip install -e .
  44. # Recompile Megatron helpers -- NOTE this will need to be done if PYTHONPATH changes later
  45. ENV PYTHONPATH=${NEMO_CHEM_HOME}:${NEMO_CHEM_HOME}/generated:${NEMO_HOME}:$PYTHONPATH
  46. ENV PACKAGE=${PACKAGE}
  47. ENV NEMO_CHEM_HOME=${NEMO_CHEM_HOME}
  48. ENV NEMO_HOME=${NEMO_HOME}
  49. ENV NEMO_BRANCH=${NEMO_BRANCH}
  50. RUN NEMO_PATH=$(python -c 'import nemo; print(nemo.__path__[0])') && \
  51. cd ${NEMO_PATH}/collections/nlp/data/language_modeling/megatron && \
  52. make
  53. COPY ./.tmp/ /tmp/
  54. COPY ./setup/config_model.sh /tmp
  55. COPY ./setup/startup.sh /opt/nvidia
  56. COPY ./setup/entrypoint.sh /opt
  57. RUN chmod +x /opt/entrypoint.sh
  58. ENV NOTEBOOK_HOME=/opt/nvidia/nemo_chem/examples/chem/nbs
  59. RUN bash /tmp/config_model.sh ${PACKAGE}
  60. WORKDIR ${NEMO_CHEM_HOME}
  61. COPY ./.tmp/ /tmp/
  62. ENTRYPOINT ["/opt/entrypoint.sh"]
  63. CMD [ "bash", "-c", "/opt/nvidia/startup.sh"]
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...