Skip to content

Commit 9d35fa1

Browse files
authored
[mgmt-framework]: support python3 in mgmt-framework (#6038)
Fix specific version for mmh3 for python2 and python3 and Add pyang for python3
1 parent ba02209 commit 9d35fa1

File tree

2 files changed

+21
-11
lines changed

2 files changed

+21
-11
lines changed

dockers/docker-sonic-mgmt-framework/Dockerfile.j2

+18-10
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,23 @@ RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%s
77
ENV DEBIAN_FRONTEND=noninteractive
88

99
RUN apt-get update && \
10-
apt-get install -y g++ python-dev libxml2
11-
12-
RUN pip install connexion==1.1.15 \
13-
setuptools==21.0.0 \
14-
grpcio-tools==1.20.0 \
15-
certifi==2017.4.17 \
16-
python-dateutil==2.6.0 \
17-
six==1.11.0 \
18-
urllib3==1.21.1
10+
apt-get install -y g++ python-dev python3-dev libxml2
11+
12+
RUN pip2 install connexion==1.1.15 \
13+
setuptools==21.0.0 \
14+
grpcio-tools==1.20.0 \
15+
certifi==2017.4.17 \
16+
python-dateutil==2.6.0 \
17+
six==1.11.0 \
18+
urllib3==1.21.1
19+
20+
RUN pip3 install connexion==2.7.0 \
21+
setuptools==21.0.0 \
22+
grpcio-tools==1.20.0 \
23+
certifi==2017.4.17 \
24+
python-dateutil==2.6.0 \
25+
six==1.11.0 \
26+
urllib3==1.21.1
1927

2028
COPY \
2129
{% for deb in docker_sonic_mgmt_framework_debs.split(' ') -%}
@@ -32,7 +40,7 @@ COPY ["start.sh", "rest-server.sh", "/usr/bin/"]
3240
COPY ["mgmt_vars.j2", "/usr/share/sonic/templates/"]
3341
COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
3442

35-
RUN apt-get remove -y g++ python-dev
43+
RUN apt-get remove -y g++ python-dev python3-dev
3644
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
3745
RUN rm -rf /debs
3846

sonic-slave-buster/Dockerfile.j2

+3-1
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,9 @@ RUN pip2 install pyang==2.1.1
431431
RUN pip3 install pyang==2.1.1
432432

433433
# For mgmt-framework build
434-
RUN pip2 install mmh3
434+
RUN pip2 install mmh3==2.5.1
435+
RUN pip3 install mmh3==2.5.1
436+
435437
RUN apt-get install -y xsltproc
436438

437439
# Install dependencies for isc-dhcp-relay build

0 commit comments

Comments
 (0)