Skip to content

Instantly share code, notes, and snippets.

@nickgnd
Created July 23, 2023 14:40
Show Gist options
  • Save nickgnd/be655678ca852a8a57d917ab14cbde2e to your computer and use it in GitHub Desktop.
Save nickgnd/be655678ca852a8a57d917ab14cbde2e to your computer and use it in GitHub Desktop.
Dockerfile to deploy livebook with `exgboost` to huggingface
FROM ghcr.io/livebook-dev/livebook:latest-cuda11.8
ENV LIVEBOOK_APP_SERVICE_NAME "🐳 Hugging Face - $SPACE_TITLE"
ENV LIVEBOOK_APP_SERVICE_URL "https://huggingface.co/spaces/$SPACE_AUTHOR_NAME/$SPACE_REPO_NAME"
ENV LIVEBOOK_UPDATE_INSTRUCTIONS_URL "https://livebook.dev"
ENV LIVEBOOK_WITHIN_IFRAME "true"
ENV LIVEBOOK_APPS_PATH "/public-apps"
ENV LIVEBOOK_DATA_PATH "/data"
ENV LIVEBOOK_PORT 7860
RUN apt-get update && apt-get install build-essential wget -y
# Install a recent version of cmake needed by exgboost
RUN wget https://github.com/Kitware/CMake/releases/download/v3.24.1/cmake-3.24.1-Linux-x86_64.sh \
-q -O /tmp/cmake-install.sh \
&& chmod u+x /tmp/cmake-install.sh \
&& mkdir /opt/cmake-3.24.1 \
&& /tmp/cmake-install.sh --skip-license --prefix=/opt/cmake-3.24.1 \
&& rm /tmp/cmake-install.sh \
&& ln -s /opt/cmake-3.24.1/bin/* /usr/local/bin
EXPOSE 7860
USER root
COPY public-apps/ /public-apps
RUN mkdir -p /data
COPY diamonds.csv /data
COPY exgboost-intro.livemd /data
RUN chmod -R 777 /data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment