You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

pytorch.dockerfile 1.2 kB

12345678910111213141516171819202122232425262728293031323334353637
  1. # syntax = docker/dockerfile:experimental
  2. #
  3. # NOTE: To build this you will need a docker version > 18.06 with
  4. # experimental enabled and DOCKER_BUILDKIT=1
  5. #
  6. # If you do not use buildkit you are not going to have a good time
  7. #
  8. # For reference:
  9. # https://docs.docker.com/develop/develop-images/build_enhancements/
  10. #ARG BASE_IMAGE=reg.docker.alibaba-inc.com/pai-dlc/pytorch-training:1.10PAI-gpu-py36-cu113-ubuntu18.04
  11. #FROM ${BASE_IMAGE} as dev-base
  12. FROM reg.docker.alibaba-inc.com/pai-dlc/pytorch-training:1.10PAI-gpu-py36-cu113-ubuntu18.04 as dev-base
  13. # config pip source
  14. RUN mkdir /root/.pip
  15. COPY docker/rcfiles/pip.conf.tsinghua /root/.pip/pip.conf
  16. # install modelscope and its python env
  17. WORKDIR /opt/modelscope
  18. COPY . .
  19. RUN pip install -r requirements.txt
  20. # RUN --mount=type=cache,target=/opt/ccache \
  21. # python setup.py install
  22. # opencv-python-headless conflict with opencv-python installed
  23. RUN python setup.py install \
  24. && pip uninstall -y opencv-python-headless
  25. # prepare modelscope libs
  26. COPY docker/scripts/install_libs.sh /tmp/
  27. RUN bash /tmp/install_libs.sh && \
  28. rm -rf /tmp/install_libs.sh
  29. ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/modelscope/lib64
  30. WORKDIR /workspace

致力于通过开放的社区合作,开源AI模型以及相关创新技术,推动基于模型即服务的生态繁荣发展