Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
thammegowda committed Mar 15, 2022
1 parent d0291e9 commit 11c53e3
Show file tree
Hide file tree
Showing 7 changed files with 3,249 additions and 11 deletions.
42 changes: 42 additions & 0 deletions dockers/rtg-0.7-py39_tr110_cu114.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# What is this: USC ISI Coral team's MT pipeline
# Authors:
# - Thamme Gowda
# Created : Oct 20, 2020

#FROM nvidia/cuda:10.2-devel-ubuntu18.04
#FROM nvidia/cuda:11.1-devel-ubuntu20.04
FROM nvidia/cuda:11.4.0-runtime-ubuntu20.04

# suppress prompts https://stackoverflow.com/a/67452950/1506477
ARG DEBIAN_FRONTEND=noninteractive
RUN apt update \
&& apt install -y curl python3.9 python3-pip python3.9-dev \
build-essential git locales locales-all \
&& apt-get autoremove --purge

ENV LC_ALL en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8

# Update pip
RUN ln -s /usr/bin/python3.9 /usr/bin/python && python -m pip install --upgrade pip

#Make non-root user;
RUN useradd --create-home rtguser
#RUN chown -Rv rtguser:rtguser /home/rtguser

WORKDIR /home/rtguser
USER rtguser

# pip installed bins go here, they needs to be in PATH
RUN mkdir -p /home/rtguser/.local/bin /home/rtguser/rtg
ENV CUDA_HOME="/usr/local/cuda/"
ENV PATH="/home/rtguser/.local/bin:/usr/local/cuda/bin:${PATH}"

#COPY --chown=rtguser:rtguser . /home/rtguser/rtg/
# && cd /home/rtguser/rtg && pip install --editable . \

RUN pip install --user torch==1.10 flask==1.1.2 uwsgi rtg==0.7 \
&& pip cache purge

CMD bash
21 changes: 18 additions & 3 deletions docs/howto-release.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
== Release instructions
== PyPI Release Instructions

* PyPI release required twine : https://twine.readthedocs.io/en/latest/
* Docs require asciidoctor: https://anaconda.org/conda-forge/asciidoctor
Expand All @@ -18,12 +18,12 @@
twine upload -r testpypi dist/*

. Make docs and link
.. List a new version for docs: `docs/versions.adoc`

.. Build docs

docs/make-docs.sh # docs

.. List a new version for docs: `docs/versions.adoc`

. Upload to **pypi**

twine upload -r pypi dist/*
Expand Down Expand Up @@ -52,3 +52,18 @@ password:<password_here>
----

For the first time users of PyPI, you need to create an account at https://pypi.org/ AND https://test.pypi.org/. Yes, they are two different accounts! Make your life easy by using same userID and password.

== Docker Release


=== Docker for ARM64

With Apple moving to ARM chips, running AMD64 docker images on ARM is not efficient.

[source,bash]
----
cd dockers
# find a suitable docker file to build; e.g., this one
docker build . -f rtg-0.7-py39_tr110_cu114.dockerfile-t tgowda/rtg:0.7-py39_tr110_cu114
----

2 changes: 1 addition & 1 deletion docs/index.html
3,154 changes: 3,154 additions & 0 deletions docs/v0.7/index.html

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/versions.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
= RTG Docs Versions
:hide-uri-scheme:

* link:v0.7[v0.7]
* link:v0.6.1[v0.6.1]
* link:v0.6.0[v0.6.0]
* link:v0.5.2[v0.5.2]
Expand Down
5 changes: 4 additions & 1 deletion docs/versions.html
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,9 @@ <h1>RTG Docs Versions</h1>
<div class="ulist">
<ul>
<li>
<p><a href="v0.7">v0.7</a></p>
</li>
<li>
<p><a href="v0.6.1">v0.6.1</a></p>
</li>
<li>
Expand Down Expand Up @@ -477,7 +480,7 @@ <h2 id="_releases">Releases</h2>
</div>
<div id="footer">
<div id="footer-text">
Last updated 2022-01-27 23:54:05 -0800
Last updated 2022-03-15 16:24:58 -0700
</div>
</div>
</body>
Expand Down
35 changes: 29 additions & 6 deletions rtg/serve/static/docs.html
Original file line number Diff line number Diff line change
Expand Up @@ -774,12 +774,17 @@ <h1>Reader-Translator-Generator (RTG)</h1>
<li><a href="#_adding_a_new_model">14.2. Adding a new model</a></li>
</ul>
</li>
<li><a href="#_release_instructions">15. Release instructions</a>
<li><a href="#_pypi_release_instructions">15. PyPI Release Instructions</a>
<ul class="sectlevel2">
<li><a href="#_steps">15.1. Steps:</a></li>
<li><a href="#_the_pypirc_file">15.2. The <code>.pypirc</code> file</a></li>
</ul>
</li>
<li><a href="#_docker_release">16. Docker Release</a>
<ul class="sectlevel2">
<li><a href="#_docker_for_arm64">16.1. Docker for ARM64</a></li>
</ul>
</li>
<li><a href="#_acknowledgements">Acknowledgements</a></li>
</ul>
</div>
Expand Down Expand Up @@ -2999,7 +3004,7 @@ <h3 id="_adding_a_new_model">14.2. Adding a new model</h3>
</div>
</div>
<div class="sect1">
<h2 id="_release_instructions">15. Release instructions</h2>
<h2 id="_pypi_release_instructions">15. PyPI Release Instructions</h2>
<div class="sectionbody">
<div class="ulist">
<ul>
Expand Down Expand Up @@ -3047,16 +3052,16 @@ <h3 id="_steps">15.1. Steps:</h3>
<div class="olist loweralpha">
<ol class="loweralpha" type="a">
<li>
<p>List a new version for docs: <code>docs/versions.adoc</code></p>
</li>
<li>
<p>Build docs</p>
<div class="literalblock">
<div class="content">
<pre>docs/make-docs.sh # docs</pre>
</div>
</div>
</li>
<li>
<p>List a new version for docs: <code>docs/versions.adoc</code></p>
</li>
</ol>
</div>
</li>
Expand Down Expand Up @@ -3101,6 +3106,24 @@ <h3 id="_the_pypirc_file">15.2. The <code>.pypirc</code> file</h3>
</div>
</div>
<div class="sect1">
<h2 id="_docker_release">16. Docker Release</h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="_docker_for_arm64">16.1. Docker for ARM64</h3>
<div class="paragraph">
<p>With Apple moving to ARM chips, running AMD64 docker images on ARM is not efficient.</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="rouge highlight"><code data-lang="bash"><span class="nb">cd </span>dockers
<span class="c"># find a suitable docker file to build; e.g., this one</span>
docker build <span class="nb">.</span> <span class="nt">-f</span> rtg-0.7-py39_tr110_cu114.dockerfile-t tgowda/rtg:0.7-py39_tr110_cu114</code></pre>
</div>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_acknowledgements">Acknowledgements</h2>
<div class="sectionbody">
<div class="paragraph">
Expand All @@ -3124,7 +3147,7 @@ <h2 id="_acknowledgements">Acknowledgements</h2>
</div>
<div id="footer">
<div id="footer-text">
Last updated 2022-01-27 23:54:05 -0800
Last updated 2022-03-04 20:40:04 -0800
</div>
</div>
</body>
Expand Down

0 comments on commit 11c53e3

Please sign in to comment.