diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..7c97283 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +FROM golang:1.21-alpine + +WORKDIR /src +# RUN apt update && apt install libzmq3-dev libczmq-dev -y +RUN apk add --no-cache libzmq czmq-dev git build-base +RUN git clone https://github.com/tmbdev/tarp.git +WORKDIR /src/tarp/tarp +RUN go clean +RUN go mod tidy +RUN go get -u +RUN CGO_ENABLED=1 go build -o tarp *.go +RUN cp tarp /bin + +FROM alpine:latest + +COPY --from=0 /bin/tarp /bin/tarp +RUN apk add --no-cache libzmq czmq-dev git +CMD ["/bin/tarp"] \ No newline at end of file diff --git a/README.md b/README.md index eb8cd40..46d9683 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,12 @@ Alternatively, you can also install from a local clone: make bin/tarp sudo make install +You can also use it from a docker image: +```bash +docker build -t tarp . +docker run tarp +``` + # Examples Download a dataset from Google Cloud, shuffle it, and split it into shards containing