From 3825dd0c5a7963701c7218e901b164797558402c Mon Sep 17 00:00:00 2001 From: PiotrBLL Date: Thu, 7 Nov 2024 17:23:30 +0100 Subject: [PATCH] Rename and Fix Dockerfile.hpu, add .dockerignore, update in README.md --- .dockerignore | 1 + Dockerfile_hpu => Dockerfile.hpu | 14 ++++++++------ README.md | 4 ++-- 3 files changed, 11 insertions(+), 8 deletions(-) create mode 100644 .dockerignore rename Dockerfile_hpu => Dockerfile.hpu (73%) diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..f51ac11 --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +.graph_dumps diff --git a/Dockerfile_hpu b/Dockerfile.hpu similarity index 73% rename from Dockerfile_hpu rename to Dockerfile.hpu index 5c2bd48..8c5d0ae 100644 --- a/Dockerfile_hpu +++ b/Dockerfile.hpu @@ -7,7 +7,7 @@ ENV OMPI_MCA_btl_vader_single_copy_mechanism=none ENV PT_HPU_LAZY_ACC_PAR_MODE=0 ENV PT_HPU_ENABLE_LAZY_COLLECTIVES=1 -# Install essential Linux packages and ffmpeg +# Install essential Linux packages ENV DEBIAN_FRONTEND="noninteractive" TZ=Etc/UTC RUN apt-get update && apt-get install -y \ tzdata \ @@ -15,7 +15,6 @@ RUN apt-get update && apt-get install -y \ python3-pip \ openssh-server \ vim \ - git \ iputils-ping \ net-tools \ protobuf-compiler \ @@ -26,10 +25,13 @@ RUN apt-get update && apt-get install -y \ ffmpeg \ && rm -rf /var/lib/apt/lists/* -# Copy the Whisper repo contents -ADD whisper /root/whisper +# Add Whisper repo contents +ADD . /root/whisper WORKDIR /root/whisper -# Install Python packages from Whisper requirements +# Copy requirements.txt explicitly +COPY requirements.txt /root/whisper/requirements.txt + +# Install Python packages from requirements.txt RUN pip install --upgrade pip \ - && pip install -r requirements.txt \ + && pip install -r requirements.txt diff --git a/README.md b/README.md index fe1b603..afa9175 100644 --- a/README.md +++ b/README.md @@ -145,10 +145,10 @@ print(result.text) ### Build the Docker Image ```bash -docker build -t whisper_hpu:latest -f Dockerfile_hpu . +docker build -t whisper_hpu:latest -f Dockerfile.hpu . ``` -In the `Dockerfile_hpu`, we use the `vault.habana.ai/gaudi-docker/1.17.0/ubuntu22.04/habanalabs/pytorch-installer-2.3.1:latest` base image, make sure to replace it with the appropriate version for your environment if needed. +In the `Dockerfile.hpu`, we use the `vault.habana.ai/gaudi-docker/1.17.0/ubuntu22.04/habanalabs/pytorch-installer-2.3.1:latest` base image, make sure to replace it with the appropriate version for your environment if needed. See the [PyTorch Docker Images for the IntelĀ® GaudiĀ® Accelerator](https://developer.habana.ai/catalog/pytorch-container/) for more information. ### Run the Container