Cloud Cultures, Part 6: Accelerating collective growth in Malaysia

Innovate, Connect, Cultivate

The Cloud Cultures series is an exploration of the intersection between cloud innovation and culture across the globe. 

Malaysia accelerates growth through digital transformation

Amidst the swiftly changing digital landscape, Malaysia stands out as a dynamic force capturing global attention. This nation—enriched by its diverse population comprised of Malays, Indians, Chinese, and more—is home to people and companies that have adeptly embraced innovative technologies, ensuring the benefits extend to all, not just the tech-savvy elite.

Malaysia has established a culture of digital acceleration through industries like energy, farming, and education by striking a balance between growth and the needs of their people. During my travels, I learned how they’ve embraced cloud innovation in a way that allows them to navigate the modern world with confidence and ensure that everyone is along for the ride.

Before setting out to meet with local companies, I joined General Manager of Energy and Utilities for Microsoft Malaysia, Shereeta (full name: Datin Sharifah Shereeta Syed Sheh), for a traditional Malaysian breakfast at her favorite restaurant. We sat down to talk about our upcoming interviews over nasi lemak—a delicious combination of fried anchovies, fish, hard-boiled egg, cucumber, and sambal on fragrant coconut rice, alongside pancakes, coconut grits, and colorful baked treats. Delighted by the food and excited for the day, we parted ways after breakfast. Shereeta headed out to a local chicken farm while I ventured further into the city.

PETRONAS is building a more sustainable world

I began my visit in the heart of Kuala Lumpur at the Golden Triangle, a hub for shopping, commerce, and entertainment. Standing 88-stories tall with a 17-acre park at its base, the PETRONAS Twin Towers are a wonder to behold. The skyscrapers are complete with malls, museums, a philharmonic orchestra, and a skybridge with views of the vibrant city. This is where I met Phuah Aik-Chong, CEO of Petronas Digital, to learn how PETRONAS utilizes the cloud to accelerate digital transformation.

PETRONAS is a dynamic global energy group with presence in over 100 countries. They produce and deliver energy and solutions that power society’s progress, enriching lives for a sustainable future. PETRONAS’ commitment to sustainability starts at the core of their operations and extends throughout their value chain. People are their strength and partners for growth, driving innovation to deliver a unique spectrum of solutions. PETRONAS’ commitment to Malaysia’s progress doesn’t stop at providing oil and gas—they make a concerted effort to provide development opportunities to underserved populations. One such initiative is the BeDigital Bootcamp, which involves upskilling students from various universities in Malaysia. Partnering with Microsoft, they have collaborated on multiple initiatives that reflect the mutual goal of empowering Malaysians to benefit in tandem with the rapid pace of innovation and digital advancements.

Chop Cheong Bee uses e-farming to feed Malaysia

While I stayed in the city, Shereeta took a break from the bustling metropolis and turned down a quiet dirt road. There, she learned about a local company that helps independent chicken farmers use cloud technology to turn their operations into smart farms—improving food security across Malaysia with affordable, high-quality chicken.

Founded in 1985, Chop Cheong Bee began as a poultry trading company, supplying chicken to local markets and establishments in Malaysia. After a brief period of time, they had to close due to an overwhelming number of manual tasks. However, in the late 2000s, they reopened focusing on technology and e-farming practices.

Cloud technology enables Chop Cheong Bee to create environments where chickens can thrive, utilizing a closed and climate-controlled farming system. The solution they developed collects data to inform how much feed is being consumed and the meat conversion ratios, all in real time. Today, Chop Cheong Bee is a crucial poultry supplier that facilitates a sizable portion of the chicken supply in Malaysia.

General Manager of Chop Cheong Bee, Datuk Jeffrey Ng Choon Ngee shared how e-farming is the future:

“With our solution, we can improve the broiler production index by 20 to 30 points. That’s easily a 10 percent improvement. If more farms can achieve this, then the cost of production will drop. And then hopefully, more Malaysians can afford quality poultry.”

Chop Cheong Bee built a system that can produce about 280 to 340 million chickens annually and supply 80 to 100 customers daily. This new way of farming not only provides millions of people with affordable and nutritious meat, but has also attracted a younger, more technology-focused generation of farmers to this vital industry.

Bersama Malaysia ensures citizens are part of the country’s digital acceleration

My final stop in Malaysia was a basketball court to shoot hoops with a recent graduate, Vaashini Palaniappan, who took part in the Bersama Malaysia (Together with Malaysia) program. Alongside sponsors like the Ministry of Education and Microsoft, the initiative teaches students digital skilling, inspiring young students, and women to dream outside the norm and build careers in tech.

Vaashini Palaniappan, data scientist and recent graduate, shared her future aspirations:

“There are so many women in this data and AI field that want to invent something, that want a brighter future. Because of this, I’m inspired to do something different. I want to be inventive using AI.”

Growing up in a small town, Vaashini didn’t have a lot of exposure to technology. But by participating in university programs, she was able to study sciences, learn technical skills, and understand the impact of advanced technologies on medicine. After seeing a close friend pass from cancer, Vaashini said she was determined to become a doctor and leverage innovative technology for good—specifically, to use AI to detect early signs of cancer and build a hyper-personalized treatment plan for patients.

Bersama Malaysia, along with Microsoft’s Code with Barriers program, were created to ensure citizens of Malaysia are a part of the digital acceleration of the country. These programs are empowering Malaysia’s inclusive digital economy and advancing the nation’s digital transformation across the private and public sectors. Malaysia has consistently been a trailblazer in fostering opportunities for its citizens. Through initiatives like Bersama Malaysia, the nation ensures that no one is left behind in the dynamic landscape of transformation.

Innovating together makes change happen

Later that evening, Shereeta and I discussed our journey over my first experience with a popular local fruit: the durian. After getting used to the infamous smell, I snacked on the custard-like meat and reflected on Malaysia’s inspiring commitment to extending growth far beyond the gleaming skyscrapers and urban epicenters. This version of cloud culture ensures that as the pace of progress quickens, it doesn’t come at the cost of anyone being sidelined. As is often the case, I saw in Malaysia that the best way to accelerate growth isn’t racing ahead; it’s moving forward together.

In this ever-changing world, there is always more to experience. See you on my next adventure!

Learn more:

Watch more Cloud Cultures episodes

Find the Azure geography that meets your needs

Cloud Cultures

Explore the ways people across the globe are using Azure technology

Learn more

The post Cloud Cultures, Part 6: Accelerating collective growth in Malaysia appeared first on Azure Blog.
Quelle: Azure

Get started with the latest updates for Dockerfile syntax (v1.7.0)

Dockerfiles are fundamental tools for developers working with Docker, serving as a blueprint for creating Docker images. These text documents contain all the commands a user could call on the command line to assemble an image. Understanding and effectively utilizing Dockerfiles can significantly streamline the development process, allowing for the automation of image creation and ensuring consistent environments across different stages of development. Dockerfiles are pivotal in defining project environments, dependencies, and the configuration of applications within Docker containers.

With new versions of the BuildKit builder toolkit, Docker Buildx CLI, and Dockerfile frontend for BuildKit (v1.7.0), developers now have access to enhanced Dockerfile capabilities. This blog post delves into these new Dockerfile capabilities and explains how you can can leverage them in your projects to further optimize your Docker workflows.

Versioning

Before we get started, here’s a quick reminder of how Dockerfile is versioned and what you should do to update it. 

Although most projects use Dockerfiles to build images, BuildKit is not limited only to that format. BuildKit supports multiple different frontends for defining the build steps for BuildKit to process. Anyone can create these frontends, package them as regular container images, and load them from a registry when you invoke the build.

With the new release, we have published two such images to Docker Hub: docker/dockerfile:1.7.0 and docker/dockerfile:1.7.0-labs.

To use these frontends, you need to specify a #syntax directive at the beginning of the file to tell BuildKit which frontend image to use for the build. Here we have set it to use the latest of the 1.x.x major version. For example:

#syntax=docker/dockerfile:1

FROM alpine

This means that BuildKit is decoupled from the Dockerfile frontend syntax. You can start using new Dockerfile features right away without worrying about which BuildKit version you’re using. All the examples described in this article will work with any version of Docker that supports BuildKit (the default builder as of Docker 23), as long as you define the correct #syntax directive on the top of your Dockerfile.

You can learn more about Dockerfile frontend versions in the documentation. 

Variable expansions

When you write Dockerfiles, build steps can contain variables that are defined using the build arguments (ARG) and environment variables (ENV) instructions. The difference between build arguments and environment variables is that environment variables are kept in the resulting image and persist when a container is created from it.

When you use such variables, you most likely use ${NAME} or, more simply, $NAME in COPY, RUN, and other commands.

You might not know that Dockerfile supports two forms of Bash-like variable expansion:

${variable:-word}: Sets a value to word if the variable is unset

${variable:+word}: Sets a value to word if the variable is set

Up to this point, these special forms were not that useful in Dockerfiles because the default value of ARG instructions can be set directly:

FROM alpine
ARG foo="default value"

If you are an expert in various shell applications, you know that Bash and other tools usually have many additional forms of variable expansion to ease the development of your scripts.

In Dockerfile v1.7, we have added:

${variable#pattern} and ${variable##pattern} to remove the shortest or longest prefix from the variable’s value.

${variable%pattern} and ${variable%%pattern} to remove the shortest or longest prefix from the variable’s value.

${variable/pattern/replacement} to first replace occurrence of a pattern

${variable//pattern/replacement} to replace all occurrences of a pattern

How these rules are used might not be completely obvious at first. So, let’s look at a few examples seen in actual Dockerfiles.

For example, projects often can’t agree on whether versions for downloading your dependencies should have a “v” prefix or not. The following allows you to get the format you need:

# example VERSION=v1.2.3
ARG VERSION=${VERSION#v}
# VERSION is now '1.2.3'

In the next example, multiple variants are used by the same project:

ARG VERSION=v1.7.13
ADD https://github.com/containerd/containerd/releases/download/${VERSION}/containerd-${VERSION#v}-linux-amd64.tar.gz /

To configure different command behaviors for multi-platform builds, BuildKit provides useful built-in variables like TARGETOS and TARGETARCH. Unfortunately, not all projects use the same values. For example, in containers and the Go ecosystem, we refer to 64-bit ARM architecture as arm64, but sometimes you need aarch64 instead.

ADD https://github.com/oven-sh/bun/releases/download/bun-v1.0.30/bun-linux-${TARGETARCH/arm64/aarch64}.zip /

In this case, the URL also uses a custom name for AMD64 architecture. To pass a variable through multiple expansions, use another ARG definition with an expansion from the previous value. You could also write all the definitions on a single line, as ARG allows multiple parameters, which may hurt readability.

ARG ARCH=${TARGETARCH/arm64/aarch64}
ARG ARCH=${ARCH/amd64/x64}
ADD https://github.com/oven-sh/bun/releases/download/bun-v1.0.30/bun-linux-${ARCH}.zip /

Note that the example above is written in a way that if a user passes their own –build-arg ARCH=value, then that value is used as-is.

Now, let’s look at how new expansions can be useful in multi-stage builds.

One of the techniques described in “Advanced multi-stage build patterns” shows how build arguments can be used so that different Dockerfile commands run depending on the build-arg value. For example, you can use that pattern if you build a multi-platform image and want to run additional COPY or RUN commands only for specific platforms. If this method is new to you, you can learn more about it from that post.

In summarized form, the idea is to define a global build argument and then define build stages that use the build argument value in the stage name while pointing to the base of your target stage via the build-arg name.

Old example:

ARG BUILD_VERSION=1

FROM alpine AS base
RUN …

FROM base AS branch-version-1
RUN touch version1

FROM base AS branch-version-2
RUN touch version2

FROM branch-version-${BUILD_VERSION} AS after-condition

FROM after-condition
RUN …

When using this pattern for multi-platform builds, one of the limitations is that all the possible values for the build-arg need to be defined by your Dockerfile. This is problematic as we want Dockerfile to be built in a way that it can build on any platform and not limit it to a specific set. 

You can see other examples here and here of Dockerfiles where dummy stage aliases must be defined for all architectures, and no other architecture can be built. Instead, the pattern we would like to use is that there is one architecture that has a special behavior, and everything else shares another common behavior.

With new expansions, we can write this to demonstrate running special commands only on RISC-V, which is still somewhat new and may need custom behavior:

#syntax=docker/dockerfile:1.7

ARG ARCH=${TARGETARCH#riscv64}
ARG ARCH=${ARCH:+"common"}
ARG ARCH=${ARCH:-$TARGETARCH}

FROM –platform=$BUILDPLATFORM alpine AS base-common
ARG TARGETARCH
RUN echo "Common build, I am $TARGETARCH" > /out

FROM –platform=$BUILDPLATFORM alpine AS base-riscv64
ARG TARGETARCH
RUN echo "Riscv only special build, I am $TARGETARCH" > /out

FROM base-${ARCH} AS base

Let’s look at these ARCH definitions more closely.

The first sets ARCH to TARGETARCH but removes riscv64 from the value.

Next, as we described previously, we don’t actually want the other architectures to use their own values but instead want them all to share a common value. So, we set ARCH to common except if it was cleared from the previous riscv64 rule. 

Now, if we still have an empty value, we default it back to $TARGETARCH.

The last definition is optional, as we would already have a unique value for both cases, but it makes the final stage name base-riscv64 nicer to read.

Additional examples of including multiple conditions with shared conditions, or conditions based on architecture variants can be found in this GitHub Gist page.

Comparing this example to the initial example of conditions between stages, the new pattern isn’t limited to just controlling the platform differences of your builds but can be used with any build-arg. If you have used this pattern before, then you can effectively now define an “else” clause, whereas previously, you were limited to only “if” clauses.

Copy with keeping parent directories

The following feature has been released in the “labs” channel. Define the following at the top of your Dockerfile to use this feature.

#syntax=docker/dockerfile:1.7-labs

When you are copying files in your Dockerfile, for example, do this:

COPY app/file /to/dest/dir/

This example means the source file is copied directly to the destination directory. If your source path was a directory, all the files inside that directory would be copied directly to the destination path.

What if you have a file structure like the following:

.
├── app1
│ ├── docs
│ │ └── manual.md
│ └── src
│ └── server.go
└── app2
└── src
└── client.go

You want to copy only files in app1/src, but so that the final files at the destination would be /to/dest/dir/app1/src/server.go and not just /to/dest/dir/server.go.

With the new COPY –parents flag, you can write:

COPY –parents /app1/src/ /to/dest/dir/

This will copy the files inside the src directory and recreate the app1/src directory structure for these files.

Things get more powerful when you start to use wildcard paths. To copy the src directories for both apps into their respective locations, you can write:

COPY –parents */src/ /to/dest/dir/

This will create both /to/dest/dir/app1 and /to/dest/dir/app2, but it will not copy the docs directory. Previously, this kind of copy was not possible with a single command. You would have needed multiple copies for individual files (as shown in this example) or used some workaround with the RUN –mount instruction instead.

You can also use double-star wildcard (**) to match files under any directory structure. For example, to copy only the Go source code files anywhere in your build context, you can write:

COPY –parents **/*.go /to/dest/dir/

If you are thinking about why you would need to copy specific files instead of just using COPY ./ to copy all files, remember that your build cache gets invalidated when you include new files in your build. If you copy all files, the cache gets invalidated when any file is added or changed, whereas if you copy only Go files, only changes in these files influence the cache.

The new –parents flag is not only for COPY instructions from your build context, but obviously, you can also use them in multi-stage builds when copying files between stages using COPY –from. 

Note that with COPY –from syntax, all source paths are expected to be absolute, meaning that if the –parents flag is used with such paths, they will be fully replicated as they were in the source stage. That may not always be desirable, and instead, you may want to keep some parents but discard and replace others. In that case, you can use a special /./ relative pivot point in your source path to mark which parents you wish to copy and which should be ignored. This special path component resembles how rsync works with the –relative flag.

#syntax=docker/dockerfile:1.7-labs
FROM … AS base
RUN ./generate-lot-of-files -o /out/
# /out/usr/bin/foo
# /out/usr/lib/bar.so
# /out/usr/local/bin/baz

FROM scratch
COPY –from=base –parents /out/./**/bin/ /
# /usr/bin/foo
# /usr/local/bin/baz

This example above shows how only bin directories are copied from the collection of files that the intermediate stage generated, but all the directories will keep their paths relative to the out directory. 

Exclusion filters

The following feature has been released in the “labs” channel. Define the following at the top of your Dockerfile to use this feature:

#syntax=docker/dockerfile:1.7-labs

Another related case when moving files in your Dockerfile with COPY and ADD instructions is when you want to move a group of files but exclude a specific subset. Previously, your only options were to use RUN –mount or try to define your excluded files inside a .dockerignore file. 

.dockerignore files, however, are not a good solution for this problem, because they only list the files excluded from the client-side build context and not from builds from remote Git/HTTP URLs and are limited to one per Dockerfile. You should use them similarly to .gitignore to mark files that are never part of your project but not as a way to define your application-specific build logic.

With the new –exclude=[pattern] flag, you can now define such exclusion filters for your COPY and ADD commands directly in the Dockerfile. The pattern uses the same format as .dockerignore.

The following example copies all the files in a directory except Markdown files:

COPY –exclude=*.md app /dest/

You can use the flag multiple times to add multiple filters. The next example excludes Markdown files and also a file called README:

COPY –exclude=*.md –exclude=README app /dest/

Double-star wildcards exclude not only Markdown files in the copied directory but also in any subdirectory:

COPY –exclude=**/*.md app /dest/

As in .dockerignore files, you can also define exceptions to the exclusions with ! prefix. The following example excludes all Markdown files in any copied directory, except if the file is called important.md — in that case, it is still copied.

COPY –exclude=**/*.md –exclude=!**/important.md app /dest/

This double negative may be confusing initially, but note that this is a reversal of the previous exclude rule, and “include patterns” are defined by the source parameter of the COPY instruction.

When using –exclude together with previously described –parents copy mode, note that the exclude patterns are relative to the copied parent directories or to the pivot point /./ if one is defined. See the following directory structure for example:

assets
├── app1
│ ├── icons32x32
│ ├── icons64x64
│ ├── notes
│ └── backup
├── app2
│ └── icons32x32
└── testapp
└── icons32x32

COPY –parents –exclude=testapp assets/./**/icons* /dest/

This command would create the directory structure below. Note that only directories with the icons prefix were copied, the root parent directory assets was skipped as it was before the relative pivot point, and additionally, testapp was not copied as it was defined with an exclusion filter.

dest
├── app1
│ ├── icons32x32
│ └── icons64x64
└── app2
└── icons32x32

Conclusion

We hope this post gave you ideas for improving your Dockerfiles and that the patterns shown here will help you describe your build more efficiently. Remember that your Dockerfile can start using all these features today by defining the #syntax line on top, even if you haven’t updated to the latest Docker yet.

For a full list of other features in the new BuildKit, Buildx, and Dockerfile releases, check out the changelogs:

BuildKit v0.13.0

Buildx v0.13.0

Dockerfile v1.7.0 v1.7.0-labs

Thanks to community members @tstenner, @DYefimov, and @leandrosansilva for helping to implement these features!

If you have issues or suggestions you want to share, let us know in the issue tracker.

Learn more

Subscribe to the Docker Newsletter.

Get the latest release of Docker Desktop.

Vote on what’s next! Check out our public roadmap.

Have questions? The Docker community is here to help.

New to Docker? Get started.

Quelle: https://blog.docker.com/feed/

In den Wissensdatenbanken für Amazon Bedrock können Sie jetzt Prompts und die Anzahl der Abrufergebnisse anpassen

Wir freuen uns, Ihnen mitteilen zu können, dass Sie in den Wissensdatenbanken für Amazon Bedrock jetzt benutzerdefinierte Prompts erstellen können, um die vom Basismodell (FM) generierten Antworten besser kontrollieren zu können. Darüber hinaus können Sie die Anzahl der abgerufenen Passagen konfigurieren, was die Genauigkeit verbessert, indem dem FM zusätzlicher Kontext zur Verfügung gestellt wird.
Quelle: aws.amazon.com

Prognose, Kapazitäts- und Zeitplanung in Amazon Connect ist jetzt allgemein in vier weiteren AWS-Regionen verfügbar

Prognose, Kapazitäts- und Zeitplanung in Amazon Connect ist jetzt allgemein in folgenden AWS-Regionen verfügbar: Europa (Frankfurt), Asien-Pazifik (Singapur), Asien-Pazifik (Tokio) und Asien-Pazifik (Seoul). Mit diesen Funktionen können Sie prognostizieren, zuweisen und überprüfen, ob die richtige Anzahl von Kundendienstmitarbeitern zur richtigen Zeit eingeplant ist, um Ihre betrieblichen Ziele zu erreichen. Mithilfe von Funktionen für Machine Learning (ML) können Sie das Kontaktvolumen und die Ankunftsraten vorhersagen, diese Prognosen in den voraussichtlichen Personalbedarf umwandeln und Schichten für Kundendienstmitarbeiter erstellen. Mit Prognosen, Kapazitäts- und Zeitplanung können Sie, Abläufe im Kontakt-Center optimieren, Serviceziele erreichen und die Zufriedenheit von KUndendienstmitarbeitern und Kunden verbessern.
Quelle: aws.amazon.com

Amazon SageMaker Canvas kündigt ein neue Preissystem für das Training tabellarischer Modelle an

Wir sind erfreut Ihnen das neue Preissystem für das Training von benutzerdefinierten tabellarischen Modellen in Amazon SageMaker Canvas bekannt geben zu dürfen, einem No-Code-Tool, mit dem Kunden hochpräzise ML-Modelle erstellen können, ohne eine Zeile Code zu schreiben. SageMaker Canvas unterstützt numerische Vorhersagen (Regression), Vorhersagen mit 2 Kategorien (binäre Klassifikation), Vorhersagen mit 3 oder mehr Kategorien (Mehrklassen-Klassifikation) und Zeitreihenprognosen für tabellarische Modelle. Bisher basierten die Gebühren für das Training eines Modells auf der Anzahl an Zellen in einem Datensatz, der zum Trainieren des Modells verwendet wurde. Jetzt basieren die Gebühren auf den Trainings- und Verarbeitungszeiten, die zum Training des Modells verwendet werden. 
Quelle: aws.amazon.com

Wissensdatenbanken für Amazon Bedrock unterstützen jetzt private Netzwerkrichtlinien für OpenSearch Serverless

Wissensdatenbanken für Amazon Bedrock sind eine vollständig verwaltete Retrieval-Augmented Generation (RAG)-Funktion, die es Ihnen ermöglicht, Basismodelle (FMs) mit internen Unternehmensdatenquellen zu verbinden, um relevantere, kontextspezifische und genauere Antworten zu erhalten. Wir freuen uns, Ihnen mitteilen zu können, dass Wissensdatenbanken jetzt private Netzwerkrichtlinien für Amazon OpenSearch Serverless (OSS) unterstützen.
Quelle: aws.amazon.com