-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: attempt to fix build on arm64
- Loading branch information
Showing
1 changed file
with
8 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,8 @@ RUN go mod download | |
COPY . . | ||
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o miyo cmd/main.go | ||
|
||
ARG TARGETPLATFORM | ||
|
||
# Download stage for Real-ESRGAN models | ||
FROM alpine:3.19 AS downloader | ||
WORKDIR /download | ||
|
@@ -51,7 +53,12 @@ RUN sed -i 's|[email protected]:|https://github.com/|g' .gitmodules \ | |
|
||
# Final stage | ||
FROM alpine:3.19 AS runner | ||
RUN apk update && apk add --no-cache libgomp vulkan-tools mesa-vulkan-ati mesa-vulkan-intel mesa-vulkan-layers libgcc | ||
RUN apk update && \ | ||
if [ "$TARGETPLATFORM" = "linux/arm64" ]; then \ | ||
apk add --no-cache libgomp vulkan-tools mesa-vulkan-ati mesa-vulkan-layers libgcc; \ | ||
else \ | ||
apk add --no-cache libgomp vulkan-tools mesa-vulkan-ati mesa-vulkan-intel mesa-vulkan-layers libgcc; \ | ||
fi | ||
WORKDIR /app | ||
COPY --from=apibuilder /app/miyo . | ||
COPY --from=apibuilder /app/out out/ | ||
|