Skip to content

Commit

Permalink
* build from cuda
Browse files Browse the repository at this point in the history
  • Loading branch information
HYLcool committed Nov 21, 2024
1 parent f22abbc commit 0ed9010
Showing 1 changed file with 20 additions and 9 deletions.
29 changes: 20 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,37 @@
# The data-juicer image includes all open-source contents of data-juicer,
# and it will be instaled in editable mode.

FROM python:3.10.15
FROM nvidia/cuda:11.8.0-cudnn8-devel-ubuntu22.04

# prepare the java env
WORKDIR /opt
# download jdk
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
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

# install python 3.10
RUN apt-get update \
&& apt-get install -y git curl vim wget python3.10 libpython3.10-dev python3-pip \
&& apt-get install -y 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

# install 3rd-party system dependencies
RUN apt-get update \
&& apt-get install ffmpeg libsm6 libxext6 software-properties-common build-essential cmake -y

WORKDIR /data-juicer

# install requirements which need to be installed from source
RUN pip install --upgrade setuptools && pip install git+https://github.com/xinyu1205/recognize-anything.git --default-timeout 1000
RUN pip install --upgrade setuptools==69.5.1 setuptools_scm \
&& pip install git+https://github.com/xinyu1205/recognize-anything.git --default-timeout 1000

# install requirements first to better reuse installed library cache
COPY environments/ environments/
Expand All @@ -27,6 +41,3 @@ RUN cat environments/* | grep -v '^#' | xargs pip install --default-timeout 1000
COPY . .
RUN pip install -v -e .[all]
RUN pip install -v -e .[sandbox]

# install 3rd-party system dependencies
RUN apt-get update && apt-get install ffmpeg libsm6 libxext6 -y

0 comments on commit 0ed9010

Please sign in to comment.