-
Notifications
You must be signed in to change notification settings - Fork 313
Update Dockerfile #881
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
HYLcool
wants to merge
2
commits into
main
Choose a base branch
from
opt/dockerfile
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Update Dockerfile #881
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,45 +1,96 @@ | ||
| # The data-juicer image includes all open-source contents of data-juicer, | ||
| # and it will be installed in editable mode. | ||
|
|
||
| FROM nvidia/cuda:12.4.1-cudnn-devel-ubuntu22.04 | ||
| FROM nvidia/cuda:12.6.3-cudnn-devel-ubuntu24.04 | ||
|
|
||
| # change to aliyun source | ||
| # avoid hanging on interactive installation | ||
| ENV DEBIAN_FRONTEND=noninteractive | ||
|
|
||
| # add aliyun apt source mirrors for faster download in China | ||
| RUN sed -i 's/archive.ubuntu.com/mirrors.aliyun.com/g' /etc/apt/sources.list \ | ||
| && sed -i 's/security.ubuntu.com/mirrors.aliyun.com/g' /etc/apt/sources.list | ||
|
|
||
| # install python 3.10 | ||
| RUN DEBIAN_FRONTEND=noninteractive apt-get update \ | ||
| && DEBIAN_FRONTEND=noninteractive apt-get install -y git curl vim wget python3.10 libpython3.10-dev python3-pip libgl1-mesa-glx libglib2.0-0 \ | ||
| && ln -sf /usr/bin/python3.10 /usr/bin/python3 \ | ||
| && ln -sf /usr/bin/python3.10 /usr/bin/python \ | ||
| && apt-get autoclean && rm -rf /var/lib/apt/lists/* \ | ||
| && pip install --upgrade pip -i https://pypi.tuna.tsinghua.edu.cn/simple | ||
| # install some basic system dependencies | ||
| RUN apt-get update && apt-get install -y \ | ||
| git curl vim wget aria2 openssh-server gnupg build-essential cmake gfortran \ | ||
| ffmpeg libsm6 libxext6 libgl1 libglx-mesa0 libglib2.0-0 libosmesa6-dev \ | ||
| freeglut3-dev libglfw3-dev libgles2-mesa-dev vulkan-tools \ | ||
| libopenblas-dev liblapack-dev postgresql postgresql-contrib libpq-dev \ | ||
| software-properties-common \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| # install Git LFS | ||
| RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | /bin/bash \ | ||
| && apt-get install -y git-lfs && git lfs install | ||
HYLcool marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| # install gcc-11 and g++-11 | ||
| RUN apt-get update && \ | ||
| apt-get install -y gcc-11 g++-11 && \ | ||
| update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 200 && \ | ||
| update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 200 | ||
HYLcool marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| # set up Vulkan for NVIDIA | ||
| ENV NVIDIA_VISIBLE_DEVICES=all NVIDIA_DRIVER_CAPABILITIES=all VK_DRIVER_FILES=/etc/vulkan/icd.d/nvidia_icd.json | ||
| RUN mkdir -p /etc/vulkan/icd.d /etc/vulkan/implicit_layer.d /usr/share/glvnd/egl_vendor.d | ||
| RUN wget https://pai-vision-data-sh.oss-cn-shanghai.aliyuncs.com/aigc-data/isaac/nb10/nvidia_icd.json -O /etc/vulkan/icd.d/nvidia_icd.json | ||
| RUN wget https://pai-vision-data-sh.oss-cn-shanghai.aliyuncs.com/aigc-data/isaac/nb10/nvidia_layers.json -O /etc/vulkan/implicit_layer.d/nvidia_layers.json | ||
| RUN wget https://pai-vision-data-sh.oss-cn-shanghai.aliyuncs.com/aigc-data/isaac/nb10/10_nvidia.json -O /usr/share/glvnd/egl_vendor.d/10_nvidia.json | ||
| RUN wget https://pai-vision-data-sh.oss-cn-shanghai.aliyuncs.com/aigc-data/isaac/nb10/50_mesa.json -O /usr/share/glvnd/egl_vendor.d/50_mesa.json | ||
HYLcool marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| # install 3rd-party system dependencies | ||
| RUN DEBIAN_FRONTEND=noninteractive apt-get update \ | ||
| && DEBIAN_FRONTEND=noninteractive apt-get install -y ffmpeg libsm6 libxext6 software-properties-common build-essential cmake gfortran libopenblas-dev liblapack-dev postgresql postgresql-contrib libpq-dev | ||
| # install Python 3.11 | ||
| RUN add-apt-repository -y ppa:deadsnakes/ppa && \ | ||
| apt-get update && \ | ||
| apt-get install -y python3.11 python3.11-dev python3.11-venv python3.11-distutils && \ | ||
| # set the default Python | ||
| update-alternatives --install /usr/bin/python python /usr/bin/python3.11 1 && \ | ||
| update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 1 && \ | ||
| # install pip | ||
| curl https://bootstrap.pypa.io/get-pip.py | python3.11 && \ | ||
| pip install --upgrade pip | ||
|
|
||
| # prepare the java env | ||
| # install uv | ||
| RUN pip install uv -i https://pypi.tuna.tsinghua.edu.cn/simple | ||
HYLcool marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| # install java | ||
| WORKDIR /opt | ||
| # download jdk | ||
| RUN wget https://aka.ms/download-jdk/microsoft-jdk-17.0.9-linux-x64.tar.gz -O jdk.tar.gz \ | ||
| RUN wget https://aka.ms/download-jdk/microsoft-jdk-17.0.9-linux-x64.tar.gz -O jdk.tar.gz \ | ||
| && tar -xzf jdk.tar.gz \ | ||
| && rm -rf jdk.tar.gz \ | ||
| && mv jdk-17.0.9+8 jdk | ||
|
|
||
| # set the environment variable | ||
| ENV JAVA_HOME=/opt/jdk | ||
| ENV PATH=$JAVA_HOME/bin:$PATH | ||
|
|
||
| WORKDIR /data-juicer | ||
| # install Isaac Sim | ||
| ENV UV_HTTP_TIMEOUT=300 | ||
| RUN uv pip install isaacsim[all,extscache]==5.1.0 --extra-index-url https://pypi.nvidia.com --system | ||
|
|
||
| # install uv | ||
| RUN pip install uv -i https://pypi.tuna.tsinghua.edu.cn/simple | ||
| # install Isaac Lab 2.3 | ||
| ENV ACCEPT_EULA=Y | ||
| ENV OMNI_KIT_ACCEPT_EULA=Y | ||
| RUN mkdir -p /third-party | ||
| RUN uv pip install usd-core --system | ||
| # clone and install Isaac Lab | ||
| RUN cd /tmp && git clone https://github.com/isaac-sim/IsaacLab.git isaaclab && mv /tmp/isaaclab /third-party/isaaclab \ | ||
| && cd /third-party/isaaclab \ | ||
| && git checkout v2.3.0 \ | ||
| && ./isaaclab.sh --install | ||
|
|
||
| # set env vars for Isaac Lab | ||
| ENV ISAACLAB_ROOT_PATH=/third-party/isaaclab ISAACLAB_VERSION=2.3.0 | ||
|
|
||
| # install requirements which need to be installed from source | ||
| # modify assets.py for customized assets | ||
| RUN wget https://pai-vision-data-sh.oss-cn-shanghai.aliyuncs.com/aigc-data/isaac/assets.py -O /third-party/isaaclab/source/isaaclab/isaaclab/utils/assets.py | ||
HYLcool marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| WORKDIR /data-juicer | ||
|
|
||
| # install basic dependencies for Data-Juicer | ||
| RUN uv pip install --upgrade setuptools==69.5.1 setuptools_scm -i https://pypi.tuna.tsinghua.edu.cn/simple --system \ | ||
| && uv pip install http://dail-wlcb.oss-cn-wulanchabu.aliyuncs.com/data_juicer/recognize-anything-main.zip -i https://pypi.tuna.tsinghua.edu.cn/simple --system | ||
| && uv pip install git+https://github.com/datajuicer/recognize-anything.git -i https://pypi.tuna.tsinghua.edu.cn/simple --system | ||
|
|
||
| # install data-juicer then | ||
| # copy source code and install | ||
| COPY . . | ||
| RUN uv pip install -v -e .[all] -i https://pypi.tuna.tsinghua.edu.cn/simple --system \ | ||
| && python -c "import nltk; nltk.download('punkt_tab'); nltk.download('punkt'); nltk.download('averaged_perceptron_tagger'); nltk.download('averaged_perceptron_tagger_eng')" | ||
|
|
||
| # 最终入口配置 | ||
| CMD ["/bin/bash"] | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.