首页 > 其他分享 >Grad-CAM简介-网络 热力图分析

Grad-CAM简介-网络 热力图分析

时间:2022-12-16 20:45:02浏览次数:77  
标签:container runner 简介 image access entrypoint CAM Docker Grad

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.

标签:container,runner,简介,image,access,entrypoint,CAM,Docker,Grad
From: https://www.cnblogs.com/sdfasdf/p/16988257.html

相关文章

  • hasattr()、getattr()、setattr()函数简介
    hasattr(object,name)判断object对象中是否存在name属性,当然对于python的对象而言,属性包含变量和方法;有则返回True,没有则返回False;需要注意的是name参数是string类型,所以......
  • LINQ 查询简介 (C#)
    查询是一种从数据源检索数据的表达式。查询通常用专门的查询语言来表示。随着时间的推移,人们已经为各种数据源开发了不同的语言;例如,用于关系数据库的SQL和用于XML的......
  • Django 简介
    Django简介Django是Python语言的Web框架,开源且免费,可以用于满足快速开发网站的需求。Django接管了Web开发过程中的方方面面,所以开发者可以专注于编写应用程序,而不需......
  • Nginx学习总结(1):Nginx简介
    (最近,部门组织了好几个技术兴趣小组,对当前的热门技术进行研究。我加入了Nginx学习小组,与几个同事一道围绕Nginx来进行研究和学习。从今天起,我会陆陆续续发一系列有关Nginx的......
  • 光伏气象站_光伏发电站厂监测气象站简介
    光伏气象站又称光伏电厂气象站、光伏电站气象站、光伏环境监测仪,光伏气象站是专业针对光伏发电站研发生产的环境监测系统,为光伏电站配套的气象站,可采集、温度、湿度、风速、......
  • gradle下载很慢的解决方式
    想了解更多数据结构以及算法题,可以关注微信公众号“数据结构和算法”,每天一题为你精彩解答。也可以扫描下面的二维码关注我们知道gradle是国外网站,下载地址:​​https://serv......
  • 5分钟了解Gradle并构建java项目
    5分钟了解Gradle并构建java项目一、Gradle是什么及优势Gradle就是跟Maven类似的依赖加载和项目构建工具。他有如下特点配置相关依赖代码量少,不会像maven一样xml过多打包编译......
  • Express 简介、安装、使用和案例
    Express是什么express 是一个快速,简单,极简的node.js 应用开发框架,通过它,可以轻松构建各种 Web 应用(后端)。例如:接口服务传统的Web网站开发工具集成官网:​​http://expre......
  • 3.PL/SQL简介
    1.PL/SQL简介特点:支持SQL语句命令和操作支持SQL中的数据类型,还扩展了一些自己特有的类型,如:type类型支持SQL中的内置函数和运算符PL/SQL支持事务,对写好的PL/SQL程序(过......
  • nacos简介
    学习地址:https://www.bilibili.com/video/BV18E411x7eT?p=96&vd_source=e7f24a421cc55783283e95fe226df2af官网:https://nacos.io/zh-cn/docs/what-is-nacos.htmlgithub:ht......