-
Notifications
You must be signed in to change notification settings - Fork 186
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto docker image building on release (#494)
* + Add workflows to publish docker images and pypi packages automatically when a release is published * * update setuptools before installing ram to avoid ParseException * - remove comments in the requirement files when installing them * * build docker image with a newer version of python * * try to build on self-hosted runner * * try to build on self-hosted runner * * try to build on self-hosted runner * * try to build on self-hosted runner * * try to build on self-hosted runner * * try to build on self-hosted runner * * try to build on self-hosted runner * * build docker on a new runner * * fix wrong build path * * build from cuda * * install python first * * install torch first * * install torch first * * use cuda 12.4 base image * - remove cache for built images
- Loading branch information
Showing
3 changed files
with
30 additions
and
18 deletions.
There are no files selected for viewing
This file contains 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 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 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,32 +1,43 @@ | ||
# The data-juicer image includes all open-source contents of data-juicer, | ||
# and it will be instaled in editable mode. | ||
|
||
FROM python:3.8.18 | ||
FROM nvidia/cuda:12.4.1-cudnn-devel-ubuntu22.04 | ||
|
||
# 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 | ||
|
||
# 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 | ||
|
||
WORKDIR /data-juicer | ||
|
||
# install requirements which need to be installed from source | ||
RUN 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/ | ||
RUN cat environments/* | xargs pip install --default-timeout 1000 | ||
RUN cat environments/* | grep -v '^#' | xargs pip install --default-timeout 1000 | ||
|
||
# install data-juicer then | ||
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 |