Python 3.6+ FFmpeg Tensorflow 1.3 |
다른건 다 문제없지만 python 3.6 이게 은근히 까다로움;
아직까지 배포된 도커이미지들은 python3.5가 default로 설치되어 있어서 재설치하기가 귀찮음.
기존의 nvidia에서 배포하는 cuda9.0_cudnn7에 아래 커맨드를 추가함
RUN apt-get update \ && apt-get install -y software-properties-common curl \ && add-apt-repository ppa:jonathonf/python-3.6 \ && apt-get remove -y software-properties-common \ && apt autoremove -y \ && apt-get update \ && apt-get install -y python3.6 \ && curl -o /tmp/get-pip.py "https://bootstrap.pypa.io/get-pip.py" \ && python3.6 /tmp/get-pip.py \ && apt-get remove -y curl \ && apt autoremove -y \ && rm -rf /var/lib/apt/lists/* |
참고로 cuda 이미지는 아래와 같음.
ARG repository FROM ${repository}:9.0-runtime-ubuntu16.04 LABEL maintainer "NVIDIA CORPORATION <cudatools@nvidia.com>" RUN echo "deb http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64 /" > /etc/apt/sources.list.d/nvidia-ml.list ENV CUDNN_VERSION 7.0.3.11 LABEL com.nvidia.cudnn.version="${CUDNN_VERSION}" RUN apt-get update && apt-get install -y --no-install-recommends \ libcudnn7=$CUDNN_VERSION-1+cuda9.0 && \ rm -rf /var/lib/apt/lists/* |
이미지 빌드는 아래와 같이 함.
~/example$ sudo docker build --tag hello:0.1 . |
'개발_이야기 > Docker' 카테고리의 다른 글
error: python3.6 ascii (0) | 2017.11.06 |
---|---|
Unable to docker login through CLI - unauthorized: incorrect username or password (0) | 2017.11.05 |