File size: 1,338 Bytes
f451fd8 143d264 f451fd8 ca041d9 999c1c7 f451fd8 e8a1a94 f451fd8 143d264 f451fd8 d2b03a4 f451fd8 1b718f6 143d264 f451fd8 143d264 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
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
# Set up a new user named "user" with user ID 1000
RUN useradd -m -u 1000 user
# Switch to the "user" user
USER user
# Set home to the user's home directory
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
# Set the working directory to the user's home directory
WORKDIR $HOME/app
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
COPY --chown=user . $HOME/app
CMD ["python", "app.py"]
|