Use Pytorch CPU
Browse files- Dockerfile +1 -24
- pre-requirements.txt +3 -1
- requirements.txt +1 -3
Dockerfile
CHANGED
|
@@ -1,24 +1,3 @@
|
|
| 1 |
-
#!/usr/bin/env bash
|
| 2 |
-
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
|
| 3 |
-
#
|
| 4 |
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 5 |
-
# you may not use this file except in compliance with the License.
|
| 6 |
-
# You may obtain a copy of the License at
|
| 7 |
-
#
|
| 8 |
-
# http://www.apache.org/licenses/LICENSE-2.0
|
| 9 |
-
#
|
| 10 |
-
# Unless required by applicable law or agreed to in writing, software
|
| 11 |
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 12 |
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 13 |
-
# See the License for the specific language governing permissions and
|
| 14 |
-
# limitations under the License.
|
| 15 |
-
|
| 16 |
-
# Use this script to install KenLM, OpenSeq2Seq decoder, Flashlight decoder, OpenGRM Ngram tool to contaner
|
| 17 |
-
|
| 18 |
-
# How to use? Build it from NeMo root folder:
|
| 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 |
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/*
|
|
@@ -27,12 +6,10 @@ RUN --mount=target=/tmp/pre-requirements.txt,source=pre-requirements.txt pip in
|
|
| 27 |
|
| 28 |
WORKDIR /workspace
|
| 29 |
|
| 30 |
-
RUN
|
| 31 |
|
| 32 |
WORKDIR /workspace/nemo
|
| 33 |
|
| 34 |
-
RUN git checkout r2.0.0rc1
|
| 35 |
-
|
| 36 |
RUN ./reinstall.sh
|
| 37 |
|
| 38 |
RUN --mount=target=/tmp/requirements.txt,source=requirements.txt pip install --no-cache-dir -r /tmp/requirements.txt
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
FROM python:3.11
|
| 2 |
|
| 3 |
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/*
|
|
|
|
| 6 |
|
| 7 |
WORKDIR /workspace
|
| 8 |
|
| 9 |
+
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
|
| 10 |
|
| 11 |
WORKDIR /workspace/nemo
|
| 12 |
|
|
|
|
|
|
|
| 13 |
RUN ./reinstall.sh
|
| 14 |
|
| 15 |
RUN --mount=target=/tmp/requirements.txt,source=requirements.txt pip install --no-cache-dir -r /tmp/requirements.txt
|
pre-requirements.txt
CHANGED
|
@@ -1,2 +1,4 @@
|
|
|
|
|
| 1 |
Cython
|
| 2 |
-
packaging
|
|
|
|
|
|
| 1 |
+
--extra-index-url https://download.pytorch.org/whl/cpu
|
| 2 |
Cython
|
| 3 |
+
packaging
|
| 4 |
+
torch==2.5.1+cpu
|
requirements.txt
CHANGED
|
@@ -1,7 +1,5 @@
|
|
| 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
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
# nemo-toolkit[asr]==2.0.0rc1
|
| 2 |
+
huggingface-hub==0.23.2
|
| 3 |
numpy<2.0.0
|
| 4 |
ipython
|
| 5 |
# yt_dlp
|