forked from sonic-net/sonic-buildimage
-
Notifications
You must be signed in to change notification settings - Fork 0
[sonic-sdk] add sonic sdk and sonic sdk buildenv #24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
52fdfc4
[sonic-sdk] add sonic sdk and sonic sdk buildenv
stepanblyschak 389459f
fix review comments & add dep files for caching
stepanblyschak b359cae
fix alignent in slave.mk
stepanblyschak 44d0839
fix dep files
stepanblyschak 811c47f
move libsaivs-dbg to _DBG_DEPENDS
stepanblyschak File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| {% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files %} | ||
| FROM sonic-sdk | ||
|
|
||
| ARG base_os_version | ||
| ARG docker_database_version | ||
| ARG docker_swss_version | ||
| ARG docker_syncd_version | ||
| ARG image_version | ||
|
|
||
| # Make apt-get non-interactive | ||
| ENV DEBIAN_FRONTEND=noninteractive | ||
|
|
||
| RUN apt-get update && \ | ||
| apt-get install -f -y \ | ||
| build-essential | ||
|
|
||
| {% if docker_sonic_sdk_buildenv_debs.strip() -%} | ||
| # Copy locally-built Debian package dependencies | ||
| {{ copy_files("debs/", docker_sonic_sdk_buildenv_debs.split(' '), "/debs/") }} | ||
|
|
||
| # Install locally-built Debian packages and implicitly install their dependencies | ||
| {{ install_debian_packages(docker_sonic_sdk_buildenv_debs.split(' ')) }} | ||
| {%- endif %} | ||
|
|
||
| {% if docker_sonic_sdk_buildenv_whls.strip() %} | ||
| # Copy locally-built Python wheel dependencies | ||
| {{ copy_files("python-wheels/", docker_sonic_sdk_buildenv_whls.split(' '), "/python-wheels/") }} | ||
|
|
||
| # Install locally-built Python wheel dependencies | ||
| {{ install_python_wheels(docker_sonic_sdk_buildenv_whls.split(' ')) }} | ||
| {% endif %} | ||
|
|
||
| # Clean up | ||
| RUN apt-get clean -y && \ | ||
| apt-get autoclean -y && \ | ||
| apt-get autoremove -y && \ | ||
| rm -rf /debs /python-wheels/ | ||
|
|
||
| LABEL com.azure.sonic.sdk.versions.base-os=$base_os_version | ||
| LABEL com.azure.sonic.sdk.versions.database=$docker_database_version | ||
| LABEL com.azure.sonic.sdk.versions.swss=$docker_swss_version | ||
| LABEL com.azure.sonic.sdk.versions.syncd=$docker_syncd_version | ||
| LABEL com.azure.sonic.sdk.version.image_hash=$image_version |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| {% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files %} | ||
| FROM docker-config-engine-buster | ||
|
|
||
| # Make apt-get non-interactive | ||
| ENV DEBIAN_FRONTEND=noninteractive | ||
|
|
||
| RUN apt-get update | ||
|
|
||
| {% if docker_sonic_sdk_debs.strip() -%} | ||
| # Copy locally-built Debian package dependencies | ||
| {{ copy_files("debs/", docker_sonic_sdk_debs.split(' '), "/debs/") }} | ||
|
|
||
| # Install locally-built Debian packages and implicitly install their dependencies | ||
| {{ install_debian_packages(docker_sonic_sdk_debs.split(' ')) }} | ||
| {%- endif %} | ||
|
|
||
| {% if docker_sonic_sdk_whls.strip() %} | ||
| # Copy locally-built Python wheel dependencies | ||
| {{ copy_files("python-wheels/", docker_sonic_sdk_whls.split(' '), "/python-wheels/") }} | ||
|
|
||
| # Install locally-built Python wheel dependencies | ||
| {{ install_python_wheels(docker_sonic_sdk_whls.split(' ')) }} | ||
| {% endif %} | ||
|
|
||
| # Clean up | ||
| RUN apt-get clean -y && \ | ||
| apt-get autoclean -y && \ | ||
| apt-get autoremove -y && \ | ||
| rm -rf /debs /python-wheels/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
|
|
||
| DPATH := $($(DOCKER_SONIC_SDK_BUILDENV)_PATH) | ||
| DEP_FILES := $(SONIC_COMMON_FILES_LIST) rules/docker-sonic-sdk-buildenv.mk rules/docker-sonic-sdk-buildenv.dep | ||
| DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST) | ||
| DEP_FILES += $(shell git ls-files $(DPATH)) | ||
|
|
||
| $(DOCKER_SONIC_SDK_BUILDENV)_CACHE_MODE := GIT_CONTENT_SHA | ||
| $(DOCKER_SONIC_SDK_BUILDENV)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST) | ||
| $(DOCKER_SONIC_SDK_BUILDENV)_DEP_FILES := $(DEP_FILES) | ||
|
|
||
| $(eval $(call add_dbg_docker,$(DOCKER_SONIC_SDK_BUILDENV),$(DOCKER_SONIC_SDK_BUILDENV_DBG))) | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| # SONiC SDK Docker Image | ||
|
|
||
| DOCKER_SONIC_SDK_BUILDENV_STEM = sonic-sdk-buildenv | ||
| DOCKER_SONIC_SDK_BUILDENV = $(DOCKER_SONIC_SDK_BUILDENV_STEM).gz | ||
| DOCKER_SONIC_SDK_BUILDENV_DBG = $(DOCKER_SONIC_SDK_BUILDENV_STEM)-$(DBG_IMAGE_MARK).gz | ||
|
|
||
| $(DOCKER_SONIC_SDK_BUILDENV)_PATH = $(DOCKERS_PATH)/docker-sonic-sdk-buildenv | ||
|
|
||
| $(DOCKER_SONIC_SDK_BUILDENV)_DEPENDS += $(LIBSAIVS) \ | ||
| $(LIBSAIVS_DEV) \ | ||
| $(LIBSAIREDIS_DEV) \ | ||
| $(LIBSAIMETADATA_DEV) \ | ||
| $(LIBSWSSCOMMON_DEV) \ | ||
| $(LIBHIREDIS_DEV) \ | ||
| $(LIBNL3_DEV) \ | ||
| $(LIBNL_GENL3_DEV) \ | ||
| $(LIBNL_ROUTE3_DEV) \ | ||
| $(LIBNL_NF3_DEV) \ | ||
| $(LIBNL_CLI_DEV) | ||
|
|
||
| $(DOCKER_SONIC_SDK_BUILDENV)_DBG_DEPENDS = $($(DOCKER_SONIC_SDK)_DBG_DEPENDS) \ | ||
| $(LIBSAIVS_DBG) | ||
| $(DOCKER_SONIC_SDK_BUILDENV)_DBG_IMAGE_PACKAGES = $($(DOCKER_SONIC_SDK)_DBG_IMAGE_PACKAGES) | ||
|
|
||
|
|
||
| $(DOCKER_SONIC_SDK_BUILDENV)_LOAD_DOCKERS += $(DOCKER_SONIC_SDK) | ||
|
|
||
| SONIC_DOCKER_IMAGES += $(DOCKER_SONIC_SDK_BUILDENV) | ||
| SONIC_DOCKER_DBG_IMAGES += $(DOCKER_SONIC_SDK_BUILDENV_DBG) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
|
|
||
| DPATH := $($(DOCKER_SONIC_SDK)_PATH) | ||
| DEP_FILES := $(SONIC_COMMON_FILES_LIST) rules/docker-sonic-sdk.mk rules/docker-sonic-sdk.dep | ||
| DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST) | ||
| DEP_FILES += $(shell git ls-files $(DPATH)) | ||
|
|
||
| $(DOCKER_SONIC_SDK)_CACHE_MODE := GIT_CONTENT_SHA | ||
| $(DOCKER_SONIC_SDK)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST) | ||
| $(DOCKER_SONIC_SDK)_DEP_FILES := $(DEP_FILES) | ||
|
|
||
| $(eval $(call add_dbg_docker,$(DOCKER_SONIC_SDK),$(DOCKER_SONIC_SDK_DBG))) | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| # SONiC SDK Docker Image | ||
|
|
||
| DOCKER_SONIC_SDK_STEM = sonic-sdk | ||
| DOCKER_SONIC_SDK = $(DOCKER_SONIC_SDK_STEM).gz | ||
| DOCKER_SONIC_SDK_DBG = $(DOCKER_SONIC_SDK_STEM)-$(DBG_IMAGE_MARK).gz | ||
|
|
||
| $(DOCKER_SONIC_SDK)_PATH = $(DOCKERS_PATH)/docker-sonic-sdk | ||
|
|
||
| $(DOCKER_SONIC_SDK)_DEPENDS += $(LIBSAIREDIS) \ | ||
| $(LIBSAIMETADATA) | ||
| $(DOCKER_SONIC_SDK)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BUSTER) | ||
|
|
||
| $(DOCKER_SONIC_SDK)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_DEPENDS) \ | ||
| $(LIBSAIREDIS_DBG) \ | ||
| $(LIBSAIMETADATA_DBG) | ||
| $(DOCKER_SONIC_SDK)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_IMAGE_PACKAGES) | ||
|
|
||
| SONIC_DOCKER_IMAGES += $(DOCKER_SONIC_SDK) | ||
| SONIC_DOCKER_DBG_IMAGES += $(DOCKER_SONIC_SDK_DBG) | ||
|
|
||
| $(DOCKER_SONIC_SDK)_FILES += $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stepanblyschak why do we need this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hiredis library debug