こすたろーんエンジニアの試行錯誤部屋

作成物の備忘録を書いていきますー

【docker】I made a dockerfile for python 3.7 on ubuntu18.

スポンサーリンク

ubuntu18.04 comes with python3.6 by default.
Recent modules such as mlflow require python 3.7 or higher, so you will need to upgrade your python version.

Create a dockerfile to use python3.7 with ubuntu 18.04 this time.

contents

スポンサーリンク

abstract

How to create a dockerfile to use python3.7 on ubuntu 18.04

1.requirement

Jetson Xavier NX
ubuntu18.04
docker19.03.6

2. dockerfile

FROM ubuntu:18.04

ENV LC_ALL C.UTF-8
ENV LANG C.UTF-8

RUN apt-get update
RUN apt update
RUN apt install -y software-properties-common
RUN add-apt-repository ppa:deadsnakes/ppa
RUN apt update
RUN apt install -y python3.7
RUN apt-get install -y python3-pip
RUN apt install git -y
RUN python3.7 -m pip install --upgrade pip

RUN echo 'alias python="/usr/bin/python3.7"' >> ~/.bashrc

You can use python3.7 on ubuntu18 by creating an image with this dockerfile.

スポンサーリンク

refarence

zenn.dev
qiita.com