Skip to content
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 Docker Support #15

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down