From 59f5585377a7bc55b5b5f565054dd2e8b7760696 Mon Sep 17 00:00:00 2001
From: Sergey Lyskov <3302736+lyskov@users.noreply.github.com>
Date: Fri, 29 Mar 2024 18:58:38 -0600
Subject: [PATCH] update documentation and remove deprecated scripts (#41)
* Update README.md
* add reference docker files
* add reference Docker files readme
* remove deprecated Conda setup and instructions
* remove PyRosetta deprecated build option and update readme
---
README.md | 10 +-
docker/README.md | 18 +++
docker/rosetta-alpine-3.9.dockerfile | 18 +++
docker/rosetta-ml.dockerfile | 47 ++++++++
docker/rosetta-ubuntu-18.04.dockerfile | 32 ++++++
docker/rosetta-ubuntu-20.04.dockerfile | 39 +++++++
docker/rosetta-ubuntu-22.04.dockerfile | 42 +++++++
source/conda/.gitignore | 1 -
source/conda/README.md | 62 ----------
source/conda/build | 106 ------------------
source/conda/conda_build_config.yaml | 2 -
source/conda/linux-anvil/README.md | 13 ---
source/conda/linux-anvil/scripts/entrypoint | 26 -----
.../linux-anvil/scripts/entrypoint_source | 2 -
source/conda/linux-anvil/scripts/run_commands | 49 --------
.../linux-anvil/xenial-with-gcc/Dockerfile | 47 --------
source/conda/linux-anvil/xenial/Dockerfile | 39 -------
source/conda/pyrosetta_docker_build.sh | 64 -----------
.../conda/recipes/pyrosetta-binder/build.sh | 58 ----------
.../conda/recipes/pyrosetta-binder/meta.yaml | 21 ----
source/conda/recipes/pyrosetta/build.sh | 71 ------------
source/conda/recipes/pyrosetta/meta.yaml | 32 ------
source/conda/recipes/rosetta/build.sh | 61 ----------
source/conda/recipes/rosetta/meta.yaml | 25 -----
source/conda/rosetta_docker_build.sh | 55 ---------
source/src/python/PyRosetta/README.md | 93 ++++-----------
source/src/python/PyRosetta/build.py | 7 +-
27 files changed, 227 insertions(+), 813 deletions(-)
create mode 100644 docker/README.md
create mode 100644 docker/rosetta-alpine-3.9.dockerfile
create mode 100644 docker/rosetta-ml.dockerfile
create mode 100644 docker/rosetta-ubuntu-18.04.dockerfile
create mode 100644 docker/rosetta-ubuntu-20.04.dockerfile
create mode 100644 docker/rosetta-ubuntu-22.04.dockerfile
delete mode 100644 source/conda/.gitignore
delete mode 100644 source/conda/README.md
delete mode 100755 source/conda/build
delete mode 100644 source/conda/conda_build_config.yaml
delete mode 100644 source/conda/linux-anvil/README.md
delete mode 100755 source/conda/linux-anvil/scripts/entrypoint
delete mode 100644 source/conda/linux-anvil/scripts/entrypoint_source
delete mode 100755 source/conda/linux-anvil/scripts/run_commands
delete mode 100644 source/conda/linux-anvil/xenial-with-gcc/Dockerfile
delete mode 100644 source/conda/linux-anvil/xenial/Dockerfile
delete mode 100755 source/conda/pyrosetta_docker_build.sh
delete mode 100644 source/conda/recipes/pyrosetta-binder/build.sh
delete mode 100644 source/conda/recipes/pyrosetta-binder/meta.yaml
delete mode 100755 source/conda/recipes/pyrosetta/build.sh
delete mode 100644 source/conda/recipes/pyrosetta/meta.yaml
delete mode 100755 source/conda/recipes/rosetta/build.sh
delete mode 100644 source/conda/recipes/rosetta/meta.yaml
delete mode 100755 source/conda/rosetta_docker_build.sh
diff --git a/README.md b/README.md
index bb48e902e7..e2dcf46971 100644
--- a/README.md
+++ b/README.md
@@ -29,7 +29,15 @@ PyRosetta
PyRosetta are Python bindings to the Rosetta library. These can be built from the Rosetta source code.
-See for more information about PyRosetta.
+See for more information about PyRosetta.
+
+Docker
+======
+
+Official Rosetta/PyRosetta images could be found at https://hub.docker.com/r/rosettacommons/rosetta. Both `serial` and `mpi` Rosetta builds provided as well as the number of PyRosetta builds including fully functional Jupyter setups with PyRosetta pre-installed and experimenta builds with `libtorch` and `tensorflow` integration. Please see https://hub.docker.com/r/rosettacommons/rosetta for more information.
+
+Various reference Docker files could be found in `rosetta/docker` dir.
+
Developing Rosetta
==================
diff --git a/docker/README.md b/docker/README.md
new file mode 100644
index 0000000000..bf76f51e03
--- /dev/null
+++ b/docker/README.md
@@ -0,0 +1,18 @@
+
+Rosetta/PyRosetta reference Docker recipes
+==========================================
+
+Collection of various recipes to serve as example for setting up Rosetta/PyRosetta build environment.
+Note that these recipes _does not actually clone/build Rosetta or PyRosetta_ and _only serve as examples_ to
+how-to setup build environments. When using this images you will need to mount already cloned Rosetta repository build commands:
+```
+# to build Rosetta
+cd rosetta/source && ./scons.py -j8 mode=release bin
+
+# to build PyRosetta
+cd rosetta/source/src/python/PyRosetta && python3 build.py -j8
+```
+
+* `alpine-3.9` absolutely minimal Rosetta build environment
+* `ubuntu-xx.xx` reference images for building Rosetta and PyRosetta
+* `ml` PyRosetta reference image to build PyRosetta with `libtorch` and `TensorFlow` support
diff --git a/docker/rosetta-alpine-3.9.dockerfile b/docker/rosetta-alpine-3.9.dockerfile
new file mode 100644
index 0000000000..ba3a5a9428
--- /dev/null
+++ b/docker/rosetta-alpine-3.9.dockerfile
@@ -0,0 +1,18 @@
+# (c) Copyright Rosetta Commons Member Institutions.
+# (c) This file is part of the Rosetta software suite and is made available under license.
+# (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
+# (c) For more information, see http://www.rosettacommons.org. Questions about this can be
+# (c) addressed to University of Washington CoMotion, email: license@uw.edu.
+
+## @author Sergey Lyskov
+
+FROM alpine:3.9
+
+RUN apk update
+RUN apk add mc python git bash build-base zlib-dev
+RUN apk add python3 cmake ninja
+RUN apk add libexecinfo-dev
+
+RUN apk add clang clang-dev
+
+ENTRYPOINT cd ~ && /bin/bash
diff --git a/docker/rosetta-ml.dockerfile b/docker/rosetta-ml.dockerfile
new file mode 100644
index 0000000000..519fb2dbe9
--- /dev/null
+++ b/docker/rosetta-ml.dockerfile
@@ -0,0 +1,47 @@
+# (c) Copyright Rosetta Commons Member Institutions.
+# (c) This file is part of the Rosetta software suite and is made available under license.
+# (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
+# (c) For more information, see http://www.rosettacommons.org. Questions about this can be
+# (c) addressed to University of Washington CoMotion, email: license@uw.edu.
+
+## @author Sergey Lyskov
+
+
+FROM ubuntu:22.04
+
+# prevent any user interaction during install
+ENV DEBIAN_FRONTEND=noninteractive
+
+ENV LANG=C.UTF-8
+ENV LC_ALL=C.UTF-8
+
+RUN apt-get -y update
+RUN apt-get -y install --no-install-recommends mc git curl wget unzip
+RUN apt-get -y install --no-install-recommends cmake ninja-build
+RUN apt-get -y install --no-install-recommends build-essential clang
+RUN apt-get -y install --no-install-recommends zlib1g-dev libssl-dev libbz2-dev libreadline-dev libsqlite3-dev liblzma-dev libffi-dev
+
+RUN apt-get -y install --no-install-recommends python3 python3-dev python3-numpy python3-setuptools python3-distutils python3-openssl python3-venv
+
+RUN apt-get -y install --no-install-recommends ca-certificates
+
+RUN apt-get -y install --no-install-recommends python-dev-is-python3
+
+
+# Download and extract TensorFlow
+RUN wget https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-linux-x86_64-1.15.0.tar.gz
+RUN tar -xzf libtensorflow-cpu-linux-x86_64-1.15.0.tar.gz -C /usr/local && rm libtensorflow-cpu-linux-x86_64-1.15.0.tar.gz
+
+# Set environment variables for TensorFlow
+ENV LIBRARY_PATH=$LIBRARY_PATH:/usr/local/lib/
+ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/
+
+# Download and extract PyTorch
+RUN cd /root && wget https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-2.0.1%2Bcpu.zip -O libtorch.zip
+RUN cd /root && unzip libtorch.zip && rm libtorch.zip
+RUN cp -r /root/libtorch/* /usr/local && rm -rf /root/libtorch
+
+# setting up python
+RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 1
+
+#RUN apt-get clean && rm -rf /var/lib/apt/lists/*
diff --git a/docker/rosetta-ubuntu-18.04.dockerfile b/docker/rosetta-ubuntu-18.04.dockerfile
new file mode 100644
index 0000000000..5d95143385
--- /dev/null
+++ b/docker/rosetta-ubuntu-18.04.dockerfile
@@ -0,0 +1,32 @@
+# (c) Copyright Rosetta Commons Member Institutions.
+# (c) This file is part of the Rosetta software suite and is made available under license.
+# (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
+# (c) For more information, see http://www.rosettacommons.org. Questions about this can be
+# (c) addressed to University of Washington CoMotion, email: license@uw.edu.
+
+## @author Sergey Lyskov
+
+FROM ubuntu:18.04
+
+
+# prevent any user interaction during install
+ENV DEBIAN_FRONTEND=noninteractive
+
+ENV LANG=C.UTF-8
+ENV LC_ALL=C.UTF-8
+
+RUN apt-get -y update
+RUN apt-get -y install --no-install-recommends mc git curl
+RUN apt-get -y install --no-install-recommends cmake ninja-build
+RUN apt-get -y install --no-install-recommends build-essential clang
+RUN apt-get -y install --no-install-recommends zlib1g-dev libssl-dev libbz2-dev libreadline-dev libsqlite3-dev liblzma-dev libffi-dev
+
+RUN apt-get -y install --no-install-recommends python2.7 python-dev
+RUN apt-get -y install --no-install-recommends python3 python3-dev python3-numpy python3-setuptools python3-distutils python3-openssl python3-venv
+
+RUN apt-get -y install --no-install-recommends clang-tidy
+RUN apt-get -y install --no-install-recommends ca-certificates
+
+RUN apt-get -y install --no-install-recommends
+
+#RUN apt-get clean && rm -rf /var/lib/apt/lists/*
diff --git a/docker/rosetta-ubuntu-20.04.dockerfile b/docker/rosetta-ubuntu-20.04.dockerfile
new file mode 100644
index 0000000000..63b3f831d7
--- /dev/null
+++ b/docker/rosetta-ubuntu-20.04.dockerfile
@@ -0,0 +1,39 @@
+# (c) Copyright Rosetta Commons Member Institutions.
+# (c) This file is part of the Rosetta software suite and is made available under license.
+# (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
+# (c) For more information, see http://www.rosettacommons.org. Questions about this can be
+# (c) addressed to University of Washington CoMotion, email: license@uw.edu.
+
+## @author Sergey Lyskov
+
+
+FROM ubuntu:20.04
+
+# prevent any user interaction during install
+ENV DEBIAN_FRONTEND=noninteractive
+
+ENV LANG=C.UTF-8
+ENV LC_ALL=C.UTF-8
+
+RUN apt-get -y update
+RUN apt-get -y install --no-install-recommends mc git curl
+RUN apt-get -y install --no-install-recommends cmake ninja-build
+RUN apt-get -y install --no-install-recommends build-essential clang
+RUN apt-get -y install --no-install-recommends zlib1g-dev libssl-dev libbz2-dev libreadline-dev libsqlite3-dev liblzma-dev libffi-dev
+
+RUN apt-get -y install --no-install-recommends python3 python3-dev python3-numpy python3-setuptools python3-distutils python3-openssl python3-venv
+
+RUN apt-get -y install --no-install-recommends clang-tidy
+RUN apt-get -y install --no-install-recommends ca-certificates
+
+RUN apt-get -y install --no-install-recommends python3-dev
+
+RUN apt-get -y install --no-install-recommends mpich mpi-default-dev
+
+# optional
+RUN apt-get -y install --no-install-recommends clang-format
+
+# setting up python
+RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 1
+
+#RUN apt-get clean && rm -rf /var/lib/apt/lists/*
diff --git a/docker/rosetta-ubuntu-22.04.dockerfile b/docker/rosetta-ubuntu-22.04.dockerfile
new file mode 100644
index 0000000000..a26ddff142
--- /dev/null
+++ b/docker/rosetta-ubuntu-22.04.dockerfile
@@ -0,0 +1,42 @@
+# (c) Copyright Rosetta Commons Member Institutions.
+# (c) This file is part of the Rosetta software suite and is made available under license.
+# (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
+# (c) For more information, see http://www.rosettacommons.org. Questions about this can be
+# (c) addressed to University of Washington CoMotion, email: license@uw.edu.
+
+## @author Sergey Lyskov
+
+
+FROM ubuntu:22.04
+
+# prevent any user interaction during install
+ENV DEBIAN_FRONTEND=noninteractive
+
+ENV LANG=C.UTF-8
+ENV LC_ALL=C.UTF-8
+
+RUN apt-get -y update
+RUN apt-get -y install --no-install-recommends mc git curl
+RUN apt-get -y install --no-install-recommends cmake ninja-build
+RUN apt-get -y install --no-install-recommends build-essential clang
+RUN apt-get -y install --no-install-recommends zlib1g-dev libssl-dev libbz2-dev libreadline-dev libsqlite3-dev liblzma-dev libffi-dev
+
+RUN apt-get -y install --no-install-recommends python3 python3-dev python3-numpy python3-setuptools python3-distutils python3-openssl python3-venv
+
+RUN apt-get -y install --no-install-recommends clang-tidy
+RUN apt-get -y install --no-install-recommends ca-certificates
+
+RUN apt-get -y install --no-install-recommends python-dev-is-python3
+
+RUN apt-get -y install --no-install-recommends mpich mpi-default-dev # mpi
+
+# optional
+RUN apt-get -y install --no-install-recommends clang-format
+
+# for Rosetta documentation build
+RUN apt-get -y install --no-install-recommends doxygen graphviz
+
+# setting up python
+RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 1
+
+#RUN apt-get clean && rm -rf /var/lib/apt/lists/*
diff --git a/source/conda/.gitignore b/source/conda/.gitignore
deleted file mode 100644
index 6f6f5eb8f6..0000000000
--- a/source/conda/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-meta.version.yaml
diff --git a/source/conda/README.md b/source/conda/README.md
deleted file mode 100644
index d4a85fd5b0..0000000000
--- a/source/conda/README.md
+++ /dev/null
@@ -1,62 +0,0 @@
-# Conda Build Recipes
-
-A collection of build recipes and scripting components for building conda
-packages for Rosetta components. These recipes can be used to generate
-three packages:
-
-- `pyrosetta` - A `pyrosetta` build supporting the `pyrosetta.distributed`
- namespace. Notably, this build references mandatory external
- dependencies in the PyData stack and generates specialized
- multi-threading compatible compiled components.
-
-- `pyrosetta-binder` - A binary distribution of the `clang`-based
- `pyrosetta` binding generator used in the `pyrosetta` build process.
-
-- `rosetta` - The rosetta suite's command-line executables and associated
- database components.
-
-## TLDR
-
-1. Install `docker`.
-2. Use `rosetta_docker_build.sh