Dockerfile: create wrapper

create wrapper so one can start the demo with an http request
pull/2/head
leonnicolas 4 years ago
parent 465a9cf5cc
commit 485d9796df
No known key found for this signature in database
GPG Key ID: 088D0743E2B65C07

@ -33,6 +33,16 @@ jobs:
push: true
platforms: linux/amd64
tags: leonnicolas/rust-opencl-demo:latest, leonnicolas/rust-opencl-demo:${{ steps.sha.outputs.sha }}
-
name: Build and push http wrapper
id: docker_build
uses: docker/build-push-action@v2
with:
context: .
file: ./http-wrapper/Dockerfile
push: true
platforms: linux/amd64
tags: leonnicolas/rust-opencl-demo-wrapper:latest, leonnicolas/rust-opencl-demo-wrapper:${{ steps.sha.outputs.sha }}
-
name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}

@ -0,0 +1,16 @@
FROM rust as builder
RUN apt-get update
RUN apt-get install ocl-icd-opencl-dev -y
COPY . .
RUN cargo build --release
FROM golang as builder2
RUN go get github.com/parallel-programming-hwr/http-exec
FROM nvidia/opencl:devel-ubuntu18.04
WORKDIR benchmark
COPY --from=builder2 /go/bin/http-exec .
RUN apt-get update
COPY --from=builder target/release/rust-opencl-demo .
ENV PATH="${PATH}:/benchmark"
ENTRYPOINT ["./http-exec","--command=rust-opencl-demo"]
Loading…
Cancel
Save