投稿時間:2022-05-31 06:18:35 RSSフィード2022-05-31 06:00 分まとめ(20件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
海外TECH DEV Community How to build Arm and multi-architecture containers today https://dev.to/depot/how-to-build-arm-and-multi-architecture-containers-today-1n7m How to build Arm and multi architecture containers todayArm CPU usage has continued to be on the rise with things like AWS Graviton powered EC instances and Apple M MacBooks It has clear benefits like better performance increased efficiency and cheaper costs Developers using Docker locally or in production are facing new challenges with the transition to Arm They want to build images that will run natively on their M machine Meanwhile companies would like to provide images that can be built once and run anywhere i e multi architecture multi platform Existing methods for building Arm or multi architecture images today have cumbersome challenges and trade offs In this post we will explore the existing options for building Arm and multi architecture containers as well as how we have simplified these options with Depot Spoiler we provide fully managed hosted Docker builders for both x and Arm CPU platforms so your builds for either or both architectures are always natively fast with no additional configuration on your part Current state of affairsThe modern engine backing Docker BuildKit can build an image for the architecture that matches your machine If you run docker buildx build locally BuildKit builds you an image that runs natively on your machine If you want to build for an architecture that does not match your machine s you can leverage the ー platform flag to choose the target architecture build for a single architecturedocker buildx build platform linux arm By default BuildKit chooses emulation to build the Docker image if the target architecture is different from your machine BuildKit uses the QEMU project to emulate various target architectures when necessary BuildKit also supports multi platform builds where you can build a single image manifest that contains two or more images inside targeting different architectures This is specified on the CLI similar to the above but with multiple architectures in a list build for multiple architecturesdocker buildx build platform linux amd linux arm Behind the scenes the image is built once for each architecture and the results are merged into a single image manifest Again by default BuildKit builds the native platform without emulation and the other with it Emulation can be very slow So BuildKit also supports offloading the build to remote builder instances via an SSH connection to another Docker instance or connecting to a pod running in Kubernetes Note BuildKit also supports launching a containerized version of itself on the local host though not entirely useful for our cross platform use case By passing a CLI flag you can build images for Intel or Arm CPUs or both regardless of your current machine s native architecture But each approach comes with tradeoffs around build performance and infrastructure complexity Let s look at those approaches Option Slow emulationIf a build asks for an architecture different from the native host s architecture BuildKit uses its copy of QEMU to emulate the target CPU This option requires no changes to the Dockerfile Let s take a look at what is happening with our multi architecture example from above docker build platform linux arm linux amd If you re running this build on a common CI provider you re likely building on an x CPU We also know from earlier that the image is built for each platform and then the result is merged In this scenario the linux amd image is built natively and the linux arm image is built using emulation This is functional but can be painfully slow Emulation slows down builds greatly depending on what s inside the Dockerfile sometimes even by an order of magnitude or more A reasonable minute build could take minutes with emulation This speed reduction is expected and unavoidable considering what the emulator must do All machine instructions from the target architecture to the host architecture must be translated back and forth introducing latency to every machine instruction So it works but it will never be fast Alternative Cross compilationOne way to avoid emulation entirely is by using one of the more advanced Dockerfile features cross compilation It is mostly relevant for packaging compiled languages like Go Rust C C etc Cross compilation builds on top of multi stage builds and works by one stage compiling your code for the target architecture and the other configures the runtime to be exported to the final image This approach requires modifying your Dockerfile to make use of directives like FROM platform BUILDPLATFORM and FROM platform TARGETPLATFORM The former tells BuildKit to run on the native host architecture and the latter is emulated using the build target architecture With this you can minimize the amount of emulation that is needed for the build to just the final stage Which hopefully just has to copy artifacts into the image by cross compiling your code in a previous stage For example here is what a Rust cross compilation Dockerfile may look like Base builder FROM platform BUILDPLATFORM rust AS rust builderRUN apt get update amp amp apt get install y g x linux gnu libc dev amd cross g aarch linux gnu libc dev arm cross amp amp rm rf var lib apt lists RUN rustup target add x unknown linux gnu aarch unknown linux gnuRUN rustup toolchain install stable x unknown linux gnu stable aarch unknown linux gnuRUN rustup component add rustfmtENV CARGO TARGET X UNKNOWN LINUX GNU LINKER x linux gnu gcc CC x unknown linux gnu x linux gnu gcc CXX x unknown linux gnu x linux gnu g CARGO TARGET AARCH UNKNOWN LINUX GNU LINKER aarch linux gnu gcc CC aarch unknown linux gnu aarch linux gnu gcc CXX aarch unknown linux gnu aarch linux gnu g CARGO INCREMENTAL amd build FROM platform BUILDPLATFORM rust builder AS build amdWORKDIR appCOPY RUN cargo install target x unknown linux gnu path RUN mv target x unknown linux gnu release example app usr bin example app arm build FROM platform BUILDPLATFORM rust builder AS build armWORKDIR appCOPY RUN cargo install target aarch unknown linux gnu path RUN mv target aarch unknown linux gnu release example app usr bin example app Final arch images FROM platform amd debian bullseye AS final amdCOPY from build amd usr bin example app usr bin example appFROM platform arm debian bullseye AS final armCOPY from build arm usr bin example app usr bin example app Final image FROM final TARGETARCH By building the application using the x and aarch cross compilation toolchains we can ensure that the actual compile step the slowest executes using the host s native architecture then the result is packaged into a container for the target architecture Maintaining cross compilation toolchains can be tedious This approach requires carefully modifying your Dockerfile to support multiple architectures It also doesn t help if part of the build needs to run in the final stage for instance if you need to apt get install some operating system packages those steps will always require emulation Cross compiling isn t necessary as we explore below Option CI providers with native Arm supportImages built on the same host architecture as the target architecture are fast when they differ slow emulation is necessary So you might turn to a hosted CI provider to supply access to machines of varying architectures so all builds can be native and fast Unfortunately most common CI providers don t offer Arm runners and the ones that do don t integrate with multi platform builds At the time we re writing this only CircleCI offers the ability to run jobs on Arm GitHub Actions Google Cloud Build and GitLab hosted CI do not offer hosted Arm machines at all Travis CI is trialing beta Arm runners for open source projects Even if you do happen to use CircleCI and have the ability to route your jobs to Arm instances multi platform builds are still a challenge Even if the build is on Arm the Intel image would need to be built with emulation What you really need for multi platform builds is an active connection to two builder instances One Arm and one Intel so that you can take advantage of docker buildx s ability to route build jobs to the correct host for the given target Option Running your own builder instancesEmulation is slow but can be avoided by routing builds to builder instances that match the target architecture While common CI providers don t offer this ability it s possible to do it yourself Docker Buildx supports connecting to remote instances over SSH or via Kubernetes So you could launch two EC instances in AWS one with Intel CPUs and one with Arm You would install Docker on those two instances and setup SSH access from your local workstation Then register both VMs with a named Buildx build instance using the append flag to merge the two builders into a single multi platform builder instance docker buildx create name multi driver docker container platform linux arm ssh something arm instancedocker buildx create append name multi driver docker container platform linux amd ssh something intel instancedocker buildx use multiNow that your two VMs are registered with BuildKit and your local machine configured to use the named builder you can build a multi platform image without any emulation docker build platform linux arm linux amd This configuration is the fastest in raw build speed but comes with additional complexities You need to run and pay for your own cloud VMsYou ll have to maintain those VMs ensuring proper access controls and firewalls are in place OS packages updated etc This works for you and your machine individually if you want to share the builders with multiple teammates or with your existing CI provider you will need to manage or automate SSH keys or SSH certificate infrastructure Fully managed native builders with DepotWith Depot we wanted access to native build instances for both Arm and Linux and we wanted to avoid all the complexity associated with running your own builder VMs Depot is a remote Docker build service that manages a fleet of builder machines for both architectures Machines have higher specs than traditional CI providers and launch with a persistent SSD cache Our CLI depot build functions exactly like docker buildx build but integrated with the hosted service Builds are executed remotely on the remote builder instances choosing an instance to match the target build platform If you request a multi platform build two instances perform the build in parallel All builds are native all the time replacing docker buildx build with depot build depot build t repo image tag platform linux arm linux amdDepot offers a fully managed version of option above We manage all access control automation caching maintenance etc of the builder instances We run the latest version of BuildKit on each builder instance and depot build embeds the relevant BuildKit libraries to communicate with the builder instances using your Depot access token You can use depot build on your local machine ーby default you get a build matching your host architecture ーbut you can also run it from your existing CI provider Since our builder instances also manage a persistent SSD cache for build context builds are often many times faster in CI than a generic provider can deliver natively Depot s builders require zero configuration on your part Depot is the only hosted CI provider that offers native Docker builds for both Linux and Arm with multi architecture support as well See our quickstart guide for more information on getting started Our philosophy with Depot is to remove as may complexities as we can from the container image build process We built Depot s hosted builders and multi platform support as the service we wished existed and are excited to share it with you as well 2022-05-30 20:30:40
海外TECH Engadget Playtime Engineering debuts two new music makers for kids https://www.engadget.com/playtime-engineering-debuts-two-new-music-makers-for-kids-200317178.html?src=rss Playtime Engineering debuts two new music makers for kidsAhead of the NAMM trade show being held in Anaheim next weekend San Francisco s Playtime Engineering has unveiled a pair of toys the Blipbox SK synthesizer and the Blipbox myTrack groovebox designed to help even the youngest musically inclined minds produce record save and share electronic beats and melodies nbsp Playtime Engineering The SK s spacey surface detailing belies its ability to generate more than pre recorded melodies ranging from chiptunes to orchestral as well as multi mode filters oscillator schemes and stereo multi tap delay functions A signal flow diagram is printed on the unit s front face and all of the controls are labelled so that even basement level beginners can easily learn and discover new synth sounds Users will be able to export their tracks through a ⁄ inch audio out and import new sounds through the MIDI In The myTRACK conversely is a kid sized multi track sampling device that uses a x grid of playpads to trigger beats and sequences think a toned down Ableton Push Each of the pre included instruments can be applied to any or all five of the available tracks as can the process effects controlled by the device s physical levers In fact many of the myTRACK s more advanced features are presented as dedicated physical buttons rather than as buried submenu options Additionally those pre packed sounds and sequences can be updated via USB C to include new sets such as orchestra hip hop jazz rock and EDM An incorporated microphone allows your future Grandmaster Flash to explore the outside world in search of new sounds to capture and modulate The myTRACK offers a pin MIDI OUT port so that the device can connect to and control an SK while its USB C port is class compliant USB MIDI in and out so you ll be able to use it with any Mac or Windows DAW Playtime Engineering The SK will retail for and be available in November The myTRACK will follow in Q for 2022-05-30 20:03:17
海外科学 NYT > Science How to Watch Tau Herculids, a Potential New Meteor Shower https://www.nytimes.com/2022/05/30/science/meteor-shower-tau-herculids-tonight.html complete 2022-05-30 20:46:50
海外科学 NYT > Science Manhattanhenge 2022: Dates, Times and Where to Watch https://www.nytimes.com/article/manhattanhenge-sunset-time.html dates 2022-05-30 20:34:51
ニュース @日本経済新聞 電子版 東部地域の戦い「最大限の激しさ」、ウクライナ国防省 https://t.co/FB5zA7ClwL https://twitter.com/nikkei/statuses/1531378860012744704 東部地域 2022-05-30 20:55:46
ニュース @日本経済新聞 電子版 3メガ、米国向け協調融資に活路 市場変調でリスクも https://t.co/YoTm9Vr3HQ https://twitter.com/nikkei/statuses/1531367001037254657 融資 2022-05-30 20:08:39
ニュース BBC News - Home Chelsea takeover: £4.25bn sale to American-based consortium completed https://www.bbc.co.uk/sport/football/61629815?at_medium=RSS&at_campaign=KARANGA capital 2022-05-30 20:08:51
ビジネス ダイヤモンド・オンライン - 新着記事 元ソフトバンク技術者、IT農業の驚異!イチゴ・メロン栽培で「匠の技コピー」が大成功 - 儲かる農業 堕ちたJA https://diamond.jp/articles/-/303475 情報技術 2022-05-31 05:25:00
ビジネス ダイヤモンド・オンライン - 新着記事 【滋賀】JA赤字危険度ランキング2022、9農協中3農協が赤字に - 全国510農協 JA赤字危険度ランキング https://diamond.jp/articles/-/303538 単位農協 2022-05-31 05:20:00
ビジネス ダイヤモンド・オンライン - 新着記事 「毎年贈与」節税の威力!資産3億円なら2回で936万円お得!? - 生前贈与 節税チャンスは今のうち!? https://diamond.jp/articles/-/303728 生前贈与 2022-05-31 05:15:00
ビジネス ダイヤモンド・オンライン - 新着記事 大正製薬の国内初「薬の自販機」は、なぜドラッグストアのそばに設置されているのか - Diamond Premium News https://diamond.jp/articles/-/304034 diamondpremiumnews 2022-05-31 05:12:00
ビジネス ダイヤモンド・オンライン - 新着記事 【三重】JA赤字危険度ランキング2022、7農協中1農協だけ赤字転落 - 全国510農協 JA赤字危険度ランキング https://diamond.jp/articles/-/303537 単位農協 2022-05-31 05:10:00
ビジネス ダイヤモンド・オンライン - 新着記事 「Nice to meet you」、メールのみの場合は何と書く?コロナ禍で使える便利な表現 - ビジネスリーダーの英語術 https://diamond.jp/articles/-/303942 「Nicetomeetyou」、メールのみの場合は何と書くコロナ禍で使える便利な表現ビジネスリーダーの英語術ダライ・ラマ、ビル・ゲイツ、デビッド・ベッカム、オードリー・タンなどの同時通訳を務めてきた田中慶子さんが、日常やビジネスで役立つ「生きた英語」をやさしく解説たとえば、同僚などから紹介を受け、新規の取引先に初めてあいさつをする場合、相手が目の前にいるのであれば、「Nicetomeetyou」と言えばいいでしょう。 2022-05-31 05:05:00
ビジネス 電通報 | 広告業界動向とマーケティングのコラム・ニュース 前例のない時代、子どもの学びについて模索するママたちの声 https://dentsu-ho.com/articles/8207 電通 2022-05-31 06:00:00
ビジネス 電通報 | 広告業界動向とマーケティングのコラム・ニュース 【参加者募集】地域のためのEC研究所セミナー第2回「いま地域の事業者から求められる自治体のEC支援とは」6月21日開催 https://dentsu-ho.com/articles/8204 dosolutions 2022-05-31 06:00:00
ビジネス 電通報 | 広告業界動向とマーケティングのコラム・ニュース LINE、トレジャーデータ、電通が語るデータクリーンルームの役割 https://dentsu-ho.com/articles/8203 cookie 2022-05-31 06:00:00
北海道 北海道新聞 佐々木朗、巨人戦登板へ オープン戦の雪辱狙う https://www.hokkaido-np.co.jp/article/687509/ 東京ドーム 2022-05-31 05:27:00
北海道 北海道新聞 <社説>ワクチン4回目 着実に接種を進めたい https://www.hokkaido-np.co.jp/article/687470/ 新型コロナウイルス 2022-05-31 05:01:00
ビジネス 東洋経済オンライン 日本の食料自給率向上を「米国が絶対許さない」訳 米国にとって日本は「食料植民地」となっている | 政策 | 東洋経済オンライン https://toyokeizai.net/articles/-/593363?utm_source=rss&utm_medium=http&utm_campaign=link_back 東洋経済オンライン 2022-05-31 05:40:00
ビジネス 東洋経済オンライン iPhoneの「録音機能」をもっと便利に使う裏技 LINEの音声認識AIを活用「文字起こしアプリ」も | iPhoneの裏技 | 東洋経済オンライン https://toyokeizai.net/articles/-/592486?utm_source=rss&utm_medium=http&utm_campaign=link_back iphone 2022-05-31 05:20:00

コメント

このブログの人気の投稿

投稿時間:2021-06-17 05:05:34 RSSフィード2021-06-17 05:00 分まとめ(1274件)

投稿時間:2021-06-20 02:06:12 RSSフィード2021-06-20 02:00 分まとめ(3871件)

投稿時間:2020-12-01 09:41:49 RSSフィード2020-12-01 09:00 分まとめ(69件)