-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
141ee5d
commit 70d0661
Showing
4 changed files
with
124 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# What is this: USC ISI Coral team's MT pipeline | ||
# Authors: | ||
# - Thamme Gowda | ||
# Created : Oct 20, 2020 | ||
|
||
# build instr https://www.docker.com/blog/multi-arch-images/ | ||
|
||
#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.12 flask==2.1 uwsgi rtg==0.7.1 \ | ||
&& pip cache purge | ||
|
||
CMD bash | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# What is this: USC ISI Coral team's MT pipeline | ||
# Authors: | ||
# - Thamme Gowda | ||
# Created : March 15, 2022 | ||
|
||
FROM tgowda/rtg:0.7.1-ub20.04-py3.9_tr1.10_cu11.4 | ||
# Download pretrained model from rtg demo website | ||
|
||
RUN cd /home/rtguser/ && \ | ||
curl -O http://rtg.isi.edu/many-eng/models/many-eng-v2.0-rtg600eng1024d_ful74k.tgz && \ | ||
tar xvf many-eng-v2.0-rtg600eng1024d_ful74k.tgz --one-top-level=many-eng-v2.0-600toeng --strip-components 1 && \ | ||
rm *.tgz | ||
|
||
#CMD rtg-serve /home/rtguser/ | ||
#CMD python -m rtg.serve /home/rtguser/many-eng-v2.0-600toeng | ||
CMD uwsgi --http 0.0.0.0:6060 --module rtg.serve.app:app --pyargv "/home/rtguser/many-eng-v2.0-600toeng" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# RTG docker, without cuda, for arm64 cpu such as Apple silicon, Qualcomm snapdragon, Microsoft SQ etc | ||
# Authors: | ||
# - Thamme Gowda | ||
# Created : March 15, 2022 | ||
FROM ubuntu:22.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 PATH="/home/rtguser/.local/bin:${PATH}" | ||
|
||
#COPY --chown=rtguser:rtguser . /home/rtguser/rtg/ | ||
# && cd /home/rtguser/rtg && pip install --editable . \ | ||
|
||
RUN pip install --user torch==1.10.2 flask==2.0.3 uwsgi rtg==0.7 setuptools==59.5.0 && pip cache purge | ||
|
||
CMD bash | ||
|
||
RUN cd /home/rtguser/ && \ | ||
curl -O http://rtg.isi.edu/many-eng/models/many-eng-v2.0-rtg600eng1024d_ful74k.tgz && \ | ||
tar xvf many-eng-v2.0-rtg600eng1024d_ful74k.tgz --one-top-level=many-eng-v2.0-600toeng --strip-components 1 && \ | ||
rm *.tgz | ||
|
||
#CMD rtg-serve /home/rtguser/ | ||
#CMD python -m rtg.serve /home/rtguser/many-eng-v2.0-600toeng | ||
CMD uwsgi --http 0.0.0.0:6060 --module rtg.serve.app:app --pyargv "/home/rtguser/many-eng-v2.0-600toeng" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters