-
Notifications
You must be signed in to change notification settings - Fork 215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ARM64 support for Docker images #951
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM maven:3.9.9-amazoncorretto-21-al2023 AS build | ||
FROM --platform=linux/amd64,linux/arm64 maven:3.9.9-amazoncorretto-21-al2023 AS build | ||
|
||
WORKDIR /opt/opik-backend | ||
|
||
|
@@ -12,7 +12,7 @@ RUN mvn versions:set -DnewVersion=${OPIK_VERSION} && \ | |
mvn clean package -DskipTests | ||
|
||
############################### | ||
FROM amazoncorretto:21-al2023 | ||
FROM --platform=linux/amd64,linux/arm64 amazoncorretto:21-al2023 | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I dont think multiple platforms are supported here. |
||
RUN yum update -y && yum install -y shadow ca-certificates openssl perl \ | ||
&& yum clean all | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# Build stage | ||
FROM node:20.15.0-alpine3.20 as builder | ||
FROM --platform=linux/amd64,linux/arm64 node:20.15.0-alpine3.20 as builder | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I dont think multiple platforms are supported here. |
||
|
||
WORKDIR /opt/frontend | ||
|
||
|
@@ -17,7 +17,7 @@ ARG BUILD_MODE=production | |
RUN npm run build -- --mode $BUILD_MODE | ||
|
||
# Production stage | ||
FROM nginx:1.27.3-alpine3.20 | ||
FROM --platform=linux/amd64,linux/arm64 nginx:1.27.3-alpine3.20 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I dont think multiple platforms are supported here. |
||
|
||
# Copy the built files from the builder stage | ||
COPY --from=builder /opt/frontend/dist /usr/share/nginx/html | ||
|
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -50,7 +50,14 @@ This will expose the following services to the host machine | |||||||
- MySQL: Available on port 3306 | ||||||||
- Backend: Available on ports 8080 and 3003 | ||||||||
|
||||||||
## Multi-Architecture Builds | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
|
||||||||
To build the Opik frontend and backend images for both `linux/amd64` and `linux/arm64` architectures, you can use the following command: | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
|
||||||||
```bash | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we will override in docker-compose please remove |
||||||||
docker buildx create --use | ||||||||
docker buildx build --platform linux/amd64,linux/arm64 -t <your-image-name> . | ||||||||
``` | ||||||||
|
||||||||
## Stop opik | ||||||||
|
||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,9 @@ services: | |
ports: | ||
- "8080:8080" # Exposing backend HTTP port to host | ||
- "3003:3003" # Exposing additional backend port to host | ||
platform: linux/amd64,linux/arm64 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be optional, only adding an example in |
||
|
||
frontend: | ||
ports: | ||
- "5173:5173" # Exposing frontend dev server port to host | ||
platform: linux/amd64,linux/arm64 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be optional, only adding an example in |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -97,6 +97,7 @@ services: | |
condition: service_healthy | ||
clickhouse: | ||
condition: service_healthy | ||
platform: linux/amd64,linux/arm64 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we will add |
||
|
||
frontend: | ||
image: ghcr.io/comet-ml/opik/opik-frontend:${OPIK_VERSION:-latest} | ||
|
@@ -113,6 +114,7 @@ services: | |
depends_on: | ||
backend: | ||
condition: service_started | ||
platform: linux/amd64,linux/arm64 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we will add |
||
|
||
networks: | ||
default: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dont think multiple platforms are supported here.
we will add this to the build and push job. please remove