lightning/dockers/docs/Dockerfile

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

68 lines
2.1 KiB
Docker
Raw Permalink Normal View History

2023-01-14 03:02:10 +00:00
# Copyright The Lightning AI team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
FROM ubuntu:20.04
2023-01-14 03:02:10 +00:00
LABEL maintainer="Lightning-AI <https://github.com/Lightning-AI>"
SHELL ["/bin/bash", "-c"]
# https://techoverflow.net/2019/05/18/how-to-fix-configuring-tzdata-interactive-input-when-building-docker-images/
ENV \
2023-03-02 19:15:27 +00:00
DEBIAN_FRONTEND="noninteractive" \
TZ="Etc/UTC" \
2023-01-14 03:02:10 +00:00
PATH="$PATH:/root/.local/bin" \
# MAKEFLAGS="-j$(nproc)"
MAKEFLAGS="-j2"
RUN \
apt-get update -qq --fix-missing && \
apt-get install -y --no-install-recommends \
build-essential \
software-properties-common \
ca-certificates \
pkg-config \
cmake \
git \
wget \
curl \
unzip \
rsync \
ninja-build \
pandoc \
texlive-latex-extra \
dvipng \
texlive-pictures \
python3 \
python3-distutils \
python3-dev \
&& \
update-alternatives --install /usr/bin/python python /usr/bin/python3 1 && \
# Cleaning
apt-get autoremove -y && \
apt-get clean && \
rm -rf /root/.cache && \
rm -rf /var/lib/apt/lists/*
COPY requirements/docs.txt docs.txt
# NOTE: exclude specific `botocore` below as is seems to be corrupted version
2023-01-14 03:02:10 +00:00
RUN \
wget https://bootstrap.pypa.io/get-pip.py --progress=bar:force:noscroll --no-check-certificate && \
python get-pip.py && \
rm get-pip.py && \
2023-06-26 17:12:53 +00:00
pip install awscli gsutil --no-cache-dir && \
pip install torch -r docs.txt --no-cache-dir \
-f https://download.pytorch.org/whl/cpu/torch_stable.html && \
pip list