Last active
December 2, 2023 05:23
-
-
Save ysau/1b9bd7f8b1a091522049b577b02874ba to your computer and use it in GitHub Desktop.
Dockerfile for Google Differential Privacy
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
** Problem Solved ** | |
Installing dependencies for running Privacy-on-beam on computers with Apple Silicon | |
https://github.com/google/differential-privacy |
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
version: "3" | |
services: | |
app: | |
build: . | |
platform: linux/amd64 | |
# See https://docs.docker.com/desktop/networking/#ssh-agent-forwarding | |
volumes: | |
- type: bind | |
source: /run/host-services/ssh-auth.sock | |
target: /run/host-services/ssh-auth.sock | |
environment: | |
- SSH_AUTH_SOCK=/run/host-services/ssh-auth.sock |
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
FROM ubuntu:23.10 | |
# set timezone | |
ENV TZ=US DEBIAN_FRONTEND=noninteractive | |
# set working directory | |
WORKDIR /code | |
# install Bazel | |
# NOTE 'g++ unzip zip' are required by bazel | |
RUN apt update && apt install wget g++ unzip zip -y | |
RUN wget https://github.com/bazelbuild/bazelisk/releases/download/v1.8.1/bazelisk-linux-amd64 | |
RUN chmod +x bazelisk-linux-amd64 | |
RUN mv bazelisk-linux-amd64 /usr/local/bin/bazel | |
# install golang | |
RUN apt install -y golang | |
RUN export PATH=$PATH:/usr/local/go/bin | |
# install differential-privacy | |
RUN apt-get install -y make libreadline-dev bison flex | |
RUN apt-get -y update && apt-get -y install git | |
RUN git clone https://github.com/google/differential-privacy.git | |
WORKDIR /code/differential-privacy/privacy-on-beam | |
RUN go build -mod=mod ./... | |
# command to run on container start | |
ENTRYPOINT ["tail", "-f", "/dev/null"] |
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
Host github.com | |
HostName github.com | |
User git | |
IdentityFile ~/.ssh/id_ed25519 | |
ForwardAgent yes% |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem Solved
Installing dependencies for running Privacy-on-beam on computers with Apple Silicon