Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GPU镜像环境运行构建脚本有吗,官方的运行时30GB太大了 #30

Open
fantasylord opened this issue Dec 18, 2024 · 1 comment

Comments

@fantasylord
Copy link

No description provided.

@jingsongliujing
Copy link
Owner

FROM nvidia/cuda:11.4.3-cudnn8-runtime-centos7

ENV TZ Asia/Shanghai

RUN yum -y install wget szlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc make libffi-devel perl mesa-libGL.x86_64

RUN wget https://www.openssl.org/source/openssl-1.1.1q.tar.gz \
    && tar -zxvf openssl-1.1.1q.tar.gz \
    && rm -f openssl-1.1.1q.tar.gz \
    && cd openssl-1.1.1q/              \
    && ./config --prefix=/usr/local/openssl no-zlib \
    && make && make install \
    && mv /usr/include/openssl/ /usr/include/openssl.bak \
    && ln -s /usr/local/openssl/include/openssl /usr/include/openssl \
    && ln -s /usr/local/openssl/lib/libssl.so.1.1 /usr/local/lib64/libssl.so \
    && ln -s /usr/local/openssl/bin/openssl /usr/bin/openssl \
    && echo "/usr/local/openssl/lib" >> /etc/ld.so.conf    \
    && ldconfig -v

RUN wget https://www.python.org/ftp/python/3.8.12/Python-3.8.12.tgz \
    && tar -xvzf Python-3.8.12.tgz \
    && rm -f Python-3.8.12.tgz \
    && cd Python-3.8.12/   \
    && ./configure --prefix=/usr/local/python3.8 -with-openssl=/usr/local/openssl  \
    && make && make install  \
    && mv /usr/bin/python /usr/bin/python.bak \
    && ln -s /usr/local/python3.8/bin/python3.8 /usr/bin/python \
    && ln -s /usr/local/python3.8/bin/pip3.8 /usr/bin/pip \
    && ldconfig \
    && sed -i "s/python/python2.7/g" /usr/bin/yum \
    && set -i "s/python/python2.7/g" /usr/libexec/urlgrabber-ext-down \
    && cd .. \
    && rm -rf Python-3.8.12 \
    && cd .. \
    && rm -rf openssl-1.1.1q \
    && pip install onnxruntime-gpu==1.10.0 -i https://mirrors.aliyun.com/pypi/simple

可以试试这个

docker build -t onnxruntime:gpu1.10.0-cuda:11.4.3-cudnn8-runtime-centos7 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants