Skip to content

Commit 5d3bc79

Browse files
committed
update docker build step
1 parent 7fa5e27 commit 5d3bc79

File tree

1 file changed

+10
-9
lines changed
  • pages/public_cloud/ai_machine_learning/deploy_tuto_05_gradio_sketch_recognition

1 file changed

+10
-9
lines changed

pages/public_cloud/ai_machine_learning/deploy_tuto_05_gradio_sketch_recognition/guide.en-gb.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -158,26 +158,27 @@ CMD [ "python3" , "/workspace/app.py" ]
158158

159159
### Build the Docker image from the Dockerfile
160160

161-
Launch the following command from the **Dockerfile** directory to build your application image:
161+
From the directory containing your **Dockerfile**, run one of the following commands to build your application image:
162162

163163
```console
164-
docker buildx build --platform linux/amd64 -t gradio_app:latest
164+
# Build the image using your machine's default architecture
165+
docker build . -t gradio_app:latest
166+
167+
# Build image targeting the linux/amd64 architecture
168+
docker buildx build --platform linux/amd64 -t gradio_app:latest .
165169
```
166170

171+
- The **first command** builds the image using your system’s default architecture. This may work if your machine already uses the `linux/amd64` architecture, which is required to run containers with our AI products. However, on systems with a different architecture (e.g. `ARM64` on `Apple Silicon`), the resulting image will not be compatible and cannot be deployed.
172+
173+
- The **second command** explicitly targets the `linux/AMD64` architecture to ensure compatibility with our AI services. This requires `buildx`, which is not installed by default. If you haven’t used `buildx` before, you can install it by running: `docker buildx install`
174+
167175
> [!primary]
168176
>
169177
> The dot `.` argument indicates that your build context (place of the **Dockerfile** and other needed files) is the current directory.
170178
>
171179
> The `-t` argument allows you to choose the identifier to give to your image. Usually image identifiers are composed of a **name** and a **version tag** `<name>:<version>`. For this example we chose **gradio_app:latest**.
172180
>
173181
174-
> [!warning]
175-
>
176-
> Please make sure that the docker image you will push in order to run containers using AI products respects the **linux/AMD64** target architecture. You could, for instance, build your image using **buildx** as follows:
177-
>
178-
> `docker buildx build --platform linux/amd64 ...`
179-
>
180-
181182
### Push the image into the shared registry
182183

183184
> [!warning]

0 commit comments

Comments
 (0)