2023-07-25 21:15:00 +08:00
|
|
|
ARG BASE_IMAGE=reg.docker.alibaba-inc.com/modelscope/modelscope:ubuntu20.04-cuda11.3.0-py37-torch1.11.0-tf1.15.5-base
|
2022-08-22 16:01:42 +08:00
|
|
|
FROM $BASE_IMAGE
|
2023-02-07 02:28:20 +00:00
|
|
|
|
|
|
|
|
# install modelscope
|
|
|
|
|
COPY requirements /var/modelscope
|
|
|
|
|
RUN pip install --no-cache-dir --upgrade pip && \
|
|
|
|
|
pip install --no-cache-dir -r /var/modelscope/framework.txt -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html && \
|
|
|
|
|
pip install --no-cache-dir -r /var/modelscope/audio.txt -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html && \
|
|
|
|
|
pip install --no-cache-dir -r /var/modelscope/cv.txt -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html && \
|
|
|
|
|
pip install --no-cache-dir -r /var/modelscope/multi-modal.txt -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html && \
|
|
|
|
|
pip install --no-cache-dir -r /var/modelscope/nlp.txt -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html && \
|
|
|
|
|
pip install --no-cache-dir -r /var/modelscope/science.txt -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html && \
|
|
|
|
|
pip install --no-cache-dir -r /var/modelscope/tests.txt -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html && \
|
|
|
|
|
pip cache purge
|
|
|
|
|
|
|
|
|
|
# install jupyter plugin
|
|
|
|
|
RUN mkdir -p /root/.local/share/jupyter/labextensions/ && \
|
|
|
|
|
cp -r /tmp/resources/jupyter_plugins/* /root/.local/share/jupyter/labextensions/
|
|
|
|
|
|
|
|
|
|
COPY docker/scripts/modelscope_env_init.sh /usr/local/bin/ms_env_init.sh
|
2023-06-08 10:01:58 +08:00
|
|
|
# python3.8 pip install git+https://github.com/jin-s13/xtcocoapi.git@v1.13
|
|
|
|
|
# pip install git+https://github.com/gatagat/lap.git@v0.4.0
|
|
|
|
|
RUN pip install --no-cache-dir text2sql_lgesql==1.3.0 \
|
|
|
|
|
git+https://github.com/jin-s13/xtcocoapi.git@v1.13 \
|
|
|
|
|
git+https://github.com/gatagat/lap.git@v0.4.0 \
|
|
|
|
|
detectron2==0.3 -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html --force --no-deps
|
|
|
|
|
|
2023-07-25 21:15:00 +08:00
|
|
|
RUN pip install --no-cache-dir mpi4py paint_ldm \
|
|
|
|
|
mmcls>=0.21.0 mmdet>=2.25.0 decord>=0.6.0 pai-easycv \
|
|
|
|
|
ipykernel fasttext fairseq deepspeed -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html
|
2023-06-08 10:01:58 +08:00
|
|
|
|
|
|
|
|
# for cpu install cpu version faiss, faiss depends on blas lib, we install libopenblas TODO rename gpu or cpu version faiss
|
2023-01-10 14:02:15 +08:00
|
|
|
RUN if [ "$USE_GPU" = "True" ] ; then \
|
2023-07-25 21:15:00 +08:00
|
|
|
pip install --no-cache-dir funtextprocessing kwsbp==0.0.6 faiss==1.7.2 safetensors typeguard==2.13.3 scikit-learn 'pandas<1.4.0' librosa==0.9.2 funasr -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html; \
|
2023-01-10 14:02:15 +08:00
|
|
|
else \
|
2023-07-25 21:15:00 +08:00
|
|
|
pip install --no-cache-dir funtextprocessing kwsbp==0.0.6 https://modelscope.oss-cn-beijing.aliyuncs.com/releases/dependencies/faiss-1.7.2-py37-none-linux_x86_64.whl safetensors typeguard==2.13.3 scikit-learn 'pandas<1.4.0' librosa==0.9.2 funasr -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html; \
|
2022-11-11 11:03:00 +08:00
|
|
|
fi
|
2023-06-08 10:01:58 +08:00
|
|
|
|
2023-07-25 21:15:00 +08:00
|
|
|
RUN pip install --no-cache-dir wenetruntime==1.11.0 adaseq --no-deps
|
2023-06-08 10:01:58 +08:00
|
|
|
COPY examples /modelscope/examples
|
|
|
|
|
|
|
|
|
|
# for pai-easycv setup compatiblity issue
|
|
|
|
|
ENV SETUPTOOLS_USE_DISTUTILS=stdlib
|
2023-07-25 21:15:00 +08:00
|
|
|
|
|
|
|
|
RUN CUDA_HOME=/usr/local/cuda TORCH_CUDA_ARCH_LIST="6.0 6.1 7.0 7.5 8.0 8.6" pip install --no-cache-dir 'git+https://github.com/facebookresearch/detectron2.git'
|