Files
modelscope/docker/Dockerfile.amd
suluyan 5ee9b27220 feat(docker): add AMD ROCm image build from vllm-openai-rocm
Add image_type=amd that auto-resolves the newest concrete Docker Hub
tag, probes rocm/python/torch without GPU, installs modelscope from the
build branch, and tags as ubuntu*-rocm*-py*-torch*-{version}.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 11:19:02 +08:00

22 lines
906 B
Docker

FROM {base_image}
ARG BASE_IMAGE_TAG={base_image_tag}
LABEL modelscope.base_image="vllm/vllm-openai-rocm:${BASE_IMAGE_TAG}"
COPY docker/scripts/modelscope_env_init.sh /usr/local/bin/ms_env_init.sh
ARG CUR_TIME={cur_time}
RUN echo "CUR_TIME=${CUR_TIME}" && echo "BASE_IMAGE_TAG=${BASE_IMAGE_TAG}"
RUN pip config set global.index-url https://mirrors.aliyun.com/pypi/simple && \
pip config set install.trusted-host mirrors.aliyun.com && \
cd /tmp && GIT_LFS_SKIP_SMUDGE=1 git clone -b {modelscope_branch} --single-branch https://github.com/modelscope/modelscope.git && \
cd modelscope && pip install --no-cache-dir . -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html && \
cd / && rm -fr /tmp/modelscope && pip cache purge
ENV VLLM_USE_MODELSCOPE=True
ENV LMDEPLOY_USE_MODELSCOPE=True
ENV MODELSCOPE_CACHE=/mnt/workspace/.cache/modelscope/hub
SHELL ["/bin/bash", "-c"]