Skip to content

Commit 4840567

Browse files
authored
[Chore] add arg to specify python version in dockerfile (#27)
Signed-off-by: Haiyang Shi <[email protected]>
1 parent 7137d52 commit 4840567

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

docker/Dockerfile_ubuntu2204

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
11
FROM docker.io/library/ubuntu:22.04
22

33
ENV DEBIAN_FRONTEND=noninteractive
4-
RUN apt update && apt install -y git gcc make wget librdmacm-dev rdma-core libibverbs-dev libncurses5-dev libmount-dev libevent-dev libssl-dev python3-pybind11 python3-dev python3-pip libhiredis-dev liburing-dev
4+
RUN apt update && apt install -y git gcc make wget librdmacm-dev rdma-core libibverbs-dev libncurses5-dev libmount-dev libevent-dev libssl-dev libhiredis-dev liburing-dev pkg-config
5+
6+
# Install Python
7+
ARG PYTHON_VERSION=3.12
8+
RUN apt install software-properties-common -y
9+
RUN add-apt-repository ppa:deadsnakes/ppa -y
10+
RUN apt update
11+
RUN apt install -y python${PYTHON_VERSION} python${PYTHON_VERSION}-dev python${PYTHON_VERSION}-venv python3-pip
12+
RUN python${PYTHON_VERSION} -m ensurepip --upgrade
13+
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python${PYTHON_VERSION} 10
14+
RUN update-alternatives --install /usr/bin/python python /usr/bin/python${PYTHON_VERSION} 10
15+
RUN update-alternatives --config python3
16+
RUN python3 -m pip install --upgrade setuptools wheel pip pybind11
517

618
# install cmake
719
RUN cd /tmp && \

0 commit comments

Comments
 (0)