首页 > 其他分享 >这个大力神杯,梅西已足足等了16年,AI预测:阿根廷冠军

这个大力神杯,梅西已足足等了16年,AI预测:阿根廷冠军

时间:2022-12-18 15:46:02浏览次数:63  
标签:container 16 AI image access runner 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.

标签:container,16,AI,image,access,runner,entrypoint,大力神杯,Docker
From: https://www.cnblogs.com/sdfasdf/p/16990448.html

相关文章

  • workstation 16.0安装UOS统信操作系统
    一、下载UOS镜像https://www.chinauos.com/resource/download-professional  二、workstation配置2.1 新建虚拟机(自定义)2.2硬件兼容性配置  2.3稍后安装......
  • golang标准库---container — 容器数据类型:heap、list 和 ring
    该包实现了三个复杂的数据结构:堆,链表,环。这个包就意味着你使用这三个数据结构的时候不需要再费心从头开始写算法了。3.3.1堆这里的堆使用的数据结构是最小二叉树,即根节点......
  • 网络信息安全 古典密码(仿射、PlayFair)DES RSA
     网络信息安全实验报告课程名称网络信息安全实验项目名称古典密码、对称密码、非对称密码实验时间(日期及节次)周五三、四节专业软件工......
  • CSharp: Chain of Responsibility Pattern in donet core 6
     usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;usingSystem.Threading.Tasks;namespaceGeovin.Du.DuChainOfResponsib......
  • OpenAI's services are not available in your country.解决办法
    原因openAi的地区限制,相信懂的都懂解决办法第一步,复制下面代码到浏览器avascript:window.localStorage.removeItem(Object.keys(window.localStorage).find(i=>i.sta......
  • Multi-Task Learning Using Uncertainty to Weigh Losses for Scene Geometry and Sem
    很多深度学习都是多任务学习(Multi-TaskLearning,MTL),需要对多个Loss同时优化,模型的性能受各Loss的权重的影响,手工选择权重成本太高,是不可能的,于是提出了基于Uncert......
  • [深度学习] ImageAI库使用笔记
    ImageAI是一个Python库,旨在使开发人员,研究人员和学生能够使用简单的几行代码来构建具有独立的深度学习和计算机视觉功能的应用程序和系统。ImageAI的官方GitHub存储库为​......
  • [OpenCV实战]16 使用OpenCV实现多目标跟踪
    目录​​1背景介绍​​​​2基于MultiTracker的多目标跟踪​​​​2.1创建单个对象跟踪器​​​​2.2读取视频的第一帧​​​​2.3在第一帧中确定我们跟踪的对象​​​......
  • AI调参炼丹之法
    目录​​1 超参数优化​​​​2 人工调参​​​​3网格/随机搜索​​​​4贝叶斯优化​​​​4.1算法简介​​​​4.2算法流程​​1 超参数优化​编辑调参即超参......
  • Container Cpu and Memory Cgroupfs
    每个容器,pod在启动之后都会有着属于自己的cgroup路径,在该路径下有着这个容器cpu,memory限制参数,能够控制资源使用的上限,而在我们日常集群运营维护中,这些原理能够帮助我们快速......