Skip to content

Instantly share code, notes, and snippets.

@ysau
Last active December 2, 2023 05:23
Show Gist options
  • Save ysau/1b9bd7f8b1a091522049b577b02874ba to your computer and use it in GitHub Desktop.
Save ysau/1b9bd7f8b1a091522049b577b02874ba to your computer and use it in GitHub Desktop.
Dockerfile for Google Differential Privacy
** Problem Solved **
Installing dependencies for running Privacy-on-beam on computers with Apple Silicon
https://github.com/google/differential-privacy
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
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"]
Host github.com
HostName github.com
User git
IdentityFile ~/.ssh/id_ed25519
ForwardAgent yes%
@ysau
Copy link
Author

ysau commented Dec 2, 2023

Problem Solved
Installing dependencies for running Privacy-on-beam on computers with Apple Silicon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment