首页 > 编程语言 >【主色提取】模糊C均值(FCM )聚类算法和彩色图像快速模糊C均值( CIQFCM )聚类算法

【主色提取】模糊C均值(FCM )聚类算法和彩色图像快速模糊C均值( CIQFCM )聚类算法

时间:2022-12-09 19:56:45浏览次数:56  
标签:runner image 均值 access process 算法 entrypoint 聚类 Docker

Override the entrypoint of an image

Introduced in GitLab and GitLab Runner 9.4. Read more about the extended configuration options.

Before explaining the available entrypoint override methods, let’s describe how the runner starts. It uses a Docker image for the containers used in the CI/CD jobs:

  1. The runner starts a Docker container using the defined entrypoint. The default from Dockerfile that may be overridden in the .gitlab-ci.yml file.
  2. The runner attaches itself to a running container.
  3. The runner prepares a script (the combination of before_scriptscript, and after_script).
  4. The runner sends the script to the container’s shell stdin and receives the output.

To override the entrypoint of a Docker image, define an empty entrypoint in the .gitlab-ci.yml file, so the runner does not start a useless shell layer. However, that does not work for all Docker versions.

  • For Docker 17.06 and later, the entrypoint can be set to an empty value.
  • For Docker 17.03 and earlier, the entrypoint can be set to /bin/sh -c/bin/bash -c, or an equivalent shell available in the image.

The syntax of image:entrypoint is similar to Dockerfile’s ENTRYPOINT.

Let’s assume you have a super/sql:experimental image with a SQL database in it. You want to use it as a base image for your job because you want to execute some tests with this database binary. Let’s also assume that this image is configured with /usr/bin/super-sql run as an entrypoint. When the container starts without additional options, it runs the database’s process. The runner expects that the image has no entrypoint or that the entrypoint is prepared to start a shell command.

With the extended Docker configuration options, instead of:

  • Creating your own image based on super/sql:experimental.
  • Setting the ENTRYPOINT to a shell.
  • Using the new image in your CI job.

You can now define an entrypoint in the .gitlab-ci.yml file.

For Docker 17.06 and later:

image:
  name: super/sql:experimental
  entrypoint: [""]

For Docker 17.03 and earlier:

image:
  name: super/sql:experimental
  entrypoint: ["/bin/sh", "-c"]

Define image and services in config.toml

Look for the [runners.docker] section:

[runners.docker]
  image = "ruby:latest"
  services = ["mysql:latest", "postgres:latest"]

The image and services defined this way are added to all jobs run by that runner.

Access an image from a private Container Registry

To access private container registries, the GitLab Runner process can use:

To define which option should be used, the runner process reads the configuration in this order:

  • DOCKER_AUTH_CONFIG CI/CD variable.
  • DOCKER_AUTH_CONFIG environment variable set in the runner’s config.toml file.
  • config.json file in $HOME/.docker directory of the user running the process. If the --user flag is provided to run the child processes as unprivileged user, the home directory of the main runner process user is used.

Requirements and limitations

  • Available for Kubernetes executor in GitLab Runner 13.1 and later.
  • Credentials Store and Credential Helpers require binaries to be added to the GitLab Runner $PATH, and require access to do so. Therefore, these features are not available on shared runners, or any other runner where the user does not have access to the environment where the runner is installed.

Use statically-defined credentials

There are two approaches that you can take to access a private registry. Both require setting the CI/CD variable DOCKER_AUTH_CONFIG with appropriate authentication information.

  1. Per-job: To configure one job to access a private registry, add DOCKER_AUTH_CONFIG as a CI/CD variable.
  2. Per-runner: To configure a runner so all its jobs can access a private registry, add DOCKER_AUTH_CONFIG as an environment variable in the runner’s configuration.

标签:runner,image,均值,access,process,算法,entrypoint,聚类,Docker
From: https://www.cnblogs.com/sdfasdf/p/16969839.html

相关文章

  • 零基预算法在全面预算管理中的应用
    随着经济不确定因素的不断扩大,大部分企业都或多或少的受到了影响。不难发现,如果仍然使用传统的预算编制方法,似乎并不像以往那样有效。不确定因素的影响使得数据在一定时期的......
  • 字符串的全排列算法讲解
    一、字符串的排列用C++写一个函数,如Foo(constchar*str),打印出str的全排列,如abc的全排列:abc,acb,bca,dac,cab,cba一、全排列的递归实现为方便起见,用123......
  • 冒泡排序算法详解C++程序
    (1)冒泡排序算法:(BubbleSort)首先肯定是一种简单的排序算法,它重复地走访过要排序的数列,一次比较两个元素,如果他们的顺序错误就把他们交换过来。走访数列的工作是重复地进行直到......
  • 打包matlab代码算法/工程成exe文件方法
    近期自己写的算法需要给其他人员用,但是不能分享源代码,尝试对算法工程打包成exe文件,记录一下打包步骤打包步骤:命令窗口输入指令deploytool,在弹出窗口选择ApplicationComp......
  • 贪心算法_买卖股票的最佳时机含手续费
    '给定一个整数数组prices,其中第i个元素代表了第i天的股票价格;非负整数fee代表了交易股票的手续费用。'你可以无限次地完成交易,但是你每笔交易都需要付手续费。如......
  • 回溯算法_全排列_元素重复_字典去重法
    '示例1:'输入:nums=[1,1,2]'输出:[[1,1,2],[1,2,1],[2,1,1]]'示例2:'输入:nums=[1,2,3]'输出:[[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]]Pub......
  • 【KNN分类】基于模拟退火优化KNN、蝗虫算法优化KNN实现数据分类附matlab代码
    ✅作者简介:热爱科研的Matlab仿真开发者,修心和技术同步精进,matlab项目合作可私信。......
  • m基于ACO蚁群优化的FCM模糊聚类算法matlab仿真
    1.算法概述蚁群算法是通过对自然界中真实蚂蚁的集体行为的观察,模拟而得到一种仿生优化算法,它具有很好的并行性,分布性.根据蚂蚁群体不同的集体行为特征,蚁群算法可分为受......
  • m基于ACO蚁群优化的FCM模糊聚类算法matlab仿真
    1.算法概述       蚁群算法是通过对自然界中真实蚂蚁的集体行为的观察,模拟而得到一种仿生优化算法,它具有很好的并行性,分布性.根据蚂蚁群体不同的集体行为特征,......
  • 算法图解 电子书 pdf
    一句话简介:算法入门书,小薄册子,比较有意思。关注公众号:后厂村搬砖工。发送:电子书即可,对应文件夹:数据结构+算法+刷题   ......