|
FROM python:3.11 |
|
|
|
RUN --mount=target=/tmp/packages.txt,source=packages.txt apt-get update && xargs -r -a /tmp/packages.txt apt-get install -y && rm -rf /var/lib/apt/lists/* |
|
|
|
RUN --mount=target=/tmp/pre-requirements.txt,source=pre-requirements.txt pip install --no-cache-dir -r /tmp/pre-requirements.txt |
|
|
|
WORKDIR /workspace |
|
|
|
RUN wget https://github.com/NVIDIA/NeMo/archive/refs/tags/r2.0.0rc1.zip && unzip r2.0.0rc1.zip && mv NeMo-r2.0.0rc1 nemo |
|
|
|
WORKDIR /workspace/nemo |
|
|
|
RUN ./reinstall.sh |
|
|
|
RUN --mount=target=/tmp/requirements.txt,source=requirements.txt pip install --no-cache-dir -r /tmp/requirements.txt |
|
|
|
WORKDIR /workspace/nemo |
|
|
|
ENV TAR_OPTIONS="--no-same-owner" |
|
|
|
COPY ./install_beamsearch_decoders.sh /workspace/nemo/scripts/asr_language_modeling/ngram_lm/install_beamsearch_decoders.sh |
|
|
|
RUN /bin/bash scripts/asr_language_modeling/ngram_lm/install_beamsearch_decoders.sh |
|
|
|
|
|
RUN useradd -m -u 1000 user |
|
|
|
|
|
USER user |
|
|
|
|
|
ENV HOME=/home/user \ |
|
PATH=/home/user/.local/bin:$PATH |
|
|
|
|
|
WORKDIR $HOME/app |
|
|
|
|
|
COPY --chown=user . $HOME/app |
|
|
|
CMD ["python", "app.py"] |
|
|