首页 > 其他分享 >经典文献阅读之--Swin Transformer

经典文献阅读之--Swin Transformer

时间:2022-12-18 18:45:09浏览次数:81  
标签:Transformer Swin container -- 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.

标签:Transformer,Swin,container,--,image,access,runner,entrypoint,Docker
From: https://www.cnblogs.com/sdfasdf/p/16990747.html

相关文章

  • earmusic任意文件读取漏洞[代码审计]
    怎么发现的,我也不懂啊。师傅怎么说,我跟着照做,毕竟技术不到位啊。功能点分析,反正这个下载的按钮可以存在漏洞。复现过程概述这个漏洞产生在用户端,首先去注册一个用户......
  • 大学生零基础学编程要多久呢
    OverridetheentrypointofanimageIntroducedinGitLabandGitLabRunner9.4.Readmoreaboutthe extendedconfigurationoptions.Beforeexplainingtheav......
  • c#提供的线程安全封装类BlockingCollection与lock的区别及优点
     提供的线程安全封装类://1.引入System.Collections.Concurrent命名---线程安全数据结构//2.把之前的非线程安全的数据结构更换成以下数据结构即可;......
  • 16位数和32位数进行运算时的细节
    1.概览16位的数据参与运算/赋值时,在数据加载/存储阶段会有movzx指令参与,在加载16位数据到32位寄存器过程中,将高32位清0如果16位数的运算结果存在隐转或者显示转换到......
  • Git应用开发详解之Git入门指引
    Git简史官方网站:https://git-scm.com/​​Linux内核一开始使用BitKeeper来管理和维护代码。2005年,BitKeeper不再免费使用,Linux开源社区需要一套自己的版本控......
  • GuiLite 学习笔记(一) Mainloop与ViewTree
    以GuiLiteSamples中的HelloSlide为例,剖析一下GuiLite的设计思路和刷新机制;首先是main.cpp;可以分成3部分:1、根据fbmode拿到对应的phy_fb,后续的绘制都在这个fb上执行......
  • 各行业的分析报告在哪里可以找到
    1、萝卜投研:https://robo.datayes.com看数据、下载研报、上市公司PE/PB研究等。 2、镝数聚:http://www.dydata.io全行业数据&报告查找下载平台,覆盖100+行业报告及统......
  • windows文件发布助手
    源码获取giteegithub1概述这是一款用于修改windows可执行程序(exe、dll)版本号和修改VS安装项目(.vdproj)版本号的小程序。可执行程序可修改:文件版本和产品版本......
  • django总结
    内容导航django路由层内容详细django路由层1.路由匹配django2.X及以上path第一个参数些什么就匹配什么django1.X第一个参数是正则表达式无论匹配什么版本dja......
  • 2022全国高校计算机能力挑战赛区域赛python组编程题
    互联网的意义在于高质量的共享编程题1.快递行业的兴起慢慢的改变了人们的生活方式,越来越多的人选择了快递的方式。列表LA和列表LB中分别存放了一位快递小哥今年9月份每......