Try Python 3.11 base image
Browse files- Dockerfile +22 -6
- requirements.txt +4 -3
Dockerfile
CHANGED
@@ -19,24 +19,40 @@
|
|
19 |
# 1. git clone https://github.com/NVIDIA/NeMo.git && cd NeMo
|
20 |
# 2. DOCKER_BUILDKIT=1 docker build -t nemo:23.03.1 -f ./scripts/installers/Dockerfile.ngramtools .
|
21 |
|
22 |
-
FROM
|
23 |
|
24 |
-
|
|
|
25 |
|
26 |
-
|
|
|
27 |
|
28 |
-
|
|
|
|
|
29 |
|
30 |
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/*
|
31 |
|
32 |
RUN --mount=target=/tmp/pre-requirements.txt,source=pre-requirements.txt pip install --no-cache-dir -r /tmp/pre-requirements.txt
|
33 |
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
RUN --mount=target=/tmp/requirements.txt,source=requirements.txt pip install --no-cache-dir -r /tmp/requirements.txt
|
35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
# Set the working directory to the user's home directory
|
37 |
WORKDIR $HOME/app
|
38 |
|
39 |
-
# Copy the current directory contents into the container at $HOME/app
|
40 |
-
COPY . $HOME/app
|
41 |
|
42 |
CMD ["python", "app.py"]
|
|
|
19 |
# 1. git clone https://github.com/NVIDIA/NeMo.git && cd NeMo
|
20 |
# 2. DOCKER_BUILDKIT=1 docker build -t nemo:23.03.1 -f ./scripts/installers/Dockerfile.ngramtools .
|
21 |
|
22 |
+
FROM python:3.11
|
23 |
|
24 |
+
# Set up a new user named "user" with user ID 1000
|
25 |
+
RUN useradd -m -u 1000 user
|
26 |
|
27 |
+
# Switch to the "user" user
|
28 |
+
USER user
|
29 |
|
30 |
+
# Set home to the user's home directory
|
31 |
+
ENV HOME=/home/user \
|
32 |
+
PATH=/home/user/.local/bin:$PATH
|
33 |
|
34 |
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/*
|
35 |
|
36 |
RUN --mount=target=/tmp/pre-requirements.txt,source=pre-requirements.txt pip install --no-cache-dir -r /tmp/pre-requirements.txt
|
37 |
|
38 |
+
WORKDIR /workspace
|
39 |
+
|
40 |
+
RUN git clone https://github.com/NVIDIA/NeMo nemo && cd nemo
|
41 |
+
|
42 |
+
RUN pip install --no-cache-dir -e .
|
43 |
+
|
44 |
RUN --mount=target=/tmp/requirements.txt,source=requirements.txt pip install --no-cache-dir -r /tmp/requirements.txt
|
45 |
|
46 |
+
WORKDIR /workspace/nemo
|
47 |
+
|
48 |
+
COPY ./install_beamsearch_decoders.sh /workspace/nemo/scripts/asr_language_modeling/ngram_lm/install_beamsearch_decoders.sh
|
49 |
+
|
50 |
+
RUN /bin/bash scripts/asr_language_modeling/ngram_lm/install_beamsearch_decoders.sh
|
51 |
+
|
52 |
# Set the working directory to the user's home directory
|
53 |
WORKDIR $HOME/app
|
54 |
|
55 |
+
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
56 |
+
COPY --chown=user . $HOME/app
|
57 |
|
58 |
CMD ["python", "app.py"]
|
requirements.txt
CHANGED
@@ -1,7 +1,8 @@
|
|
1 |
-
Cython
|
|
|
2 |
huggingface-hub==0.23.2
|
3 |
# nemo-toolkit[asr]==2.0.0rc1
|
4 |
-
|
5 |
-
|
6 |
# yt_dlp
|
7 |
gradio
|
|
|
1 |
+
# Cython
|
2 |
+
torch
|
3 |
huggingface-hub==0.23.2
|
4 |
# nemo-toolkit[asr]==2.0.0rc1
|
5 |
+
numpy<2.0.0
|
6 |
+
ipython
|
7 |
# yt_dlp
|
8 |
gradio
|