Skip to content

Commit

Permalink
[Mellanox]: Clean up syncd Python development packages (sonic-net#20556)
Browse files Browse the repository at this point in the history
Resolves: sonic-net#20419

Why I did it
To clean up syncd environment
How I did it
Removed python development packages from a Dockerfile template
How to verify it
make configure PLATFORM=mellanox
make target/sonic-mellanox.bin
  • Loading branch information
nazariig authored and KAVITHA RAMALINGAM committed Nov 15, 2024
1 parent 34c27cc commit 6ab6f2c
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions platform/mellanox/docker-syncd-mlnx/Dockerfile.j2
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
##
## Copyright (c) 2016-2024 NVIDIA CORPORATION & AFFILIATES.
## SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES
## Copyright (c) 2016-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
## Apache-2.0
##
## Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -14,6 +15,7 @@
## See the License for the specific language governing permissions and
## limitations under the License.
##

{% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files %}
FROM docker-config-engine-bookworm-{{DOCKER_USERNAME}}:{{DOCKER_USERTAG}}

Expand All @@ -26,15 +28,14 @@ ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update && \
apt-get install -y \
libxml2 \
python3-pip \
python3-dev \
python-is-python3 \
python3-jsonschema \
{%- if ENABLE_ASAN == "y" %}
libasan6 \
{%- endif %}
python3-setuptools
libxml2 \
python3-pip \
python3-dev \
python3-jsonschema \
python-is-python3

RUN pip3 install --upgrade pip
RUN apt-get purge -y python-pip
Expand All @@ -56,8 +57,11 @@ RUN apt-get purge -y python-pip
{% endif %}

## Clean up
RUN apt-get clean -y && \
apt-get autoclean -y && \
RUN apt-get purge -y \
python3-dev \
python3-pip && \
apt-get clean -y && \
apt-get autoclean -y && \
apt-get autoremove -y && \
rm -rf /debs

Expand Down

0 comments on commit 6ab6f2c

Please sign in to comment.