Skip to content

Instantly share code, notes, and snippets.

@stackcoder
Created July 28, 2021 16:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save stackcoder/584ec03d63163eb9d550df7ac8758ef7 to your computer and use it in GitHub Desktop.
Save stackcoder/584ec03d63163eb9d550df7ac8758ef7 to your computer and use it in GitHub Desktop.
Dockerfile for fawkes
FROM python:3.6-slim
RUN apt-get update && apt-get install --no-install-recommends -y \
libgl1 \
libglib2.0-0 \
curl
RUN extractor='extractor_2.h5' \
&& extractor_sha256='cdda15f239331b9535d80a94b4d75889ccb3b61d7b030c921bd2bfd7862b0adc' \
&& extractor_path='/usr/local/lib/python3.6/site-packages/fawkes/model' \
&& mkdir -p "${extractor_path}" \
&& curl -fsSL --output "${extractor_path}/${extractor}" "https://mirror.cs.uchicago.edu/fawkes/files/${extractor}" \
&& echo "${extractor_sha256} ${extractor_path}/${extractor}" | sha256sum -c -
RUN pip install fawkes==1.0.4
# Workaround for https://github.com/Shawn-Shan/fawkes/blob/600fb825689ecafc1f1abce8b0b3bd6fcd27e355/fawkes/utils.py#L591
RUN chmod -R ugo=rwX /usr/local/lib/python3.6/site-packages/fawkes/model
ENTRYPOINT ["/usr/local/bin/fawkes"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment