diff --git a/Docker/anaconda_install.sh b/Docker/anaconda_install.sh index a22ae66f..aae4c1c5 100644 --- a/Docker/anaconda_install.sh +++ b/Docker/anaconda_install.sh @@ -41,6 +41,6 @@ rm anaconda.sh rm $LOG_PATH -rm -rf "$HOME/anaconda3/pkgs" +rm -rf "$HOME/anaconda3/pkgs/*" -mkdir "$HOME/anaconda3/pkgs" +rm -rf "$HOME/.conda" "$HOME/.cache" diff --git a/Docker/setup.sh b/Docker/setup.sh index 69d813b7..17b59251 100644 --- a/Docker/setup.sh +++ b/Docker/setup.sh @@ -48,6 +48,12 @@ fi source "$HOME/anaconda3/etc/profile.d/conda.sh" +conda config --add channels conda-forge + +conda config --set channel_priority strict + +conda update -n base -c conda-forge conda -y + if [ "$LITE" = "true" ]; then bash install.sh --device "CU${CUDA_VERSION//./}" --source HF elif [ "$LITE" = "false" ]; then @@ -60,4 +66,8 @@ pip cache purge pip show torch -rm -rf "$HOME/.cache" /tmp/* /var/tmp/* +rm -rf /tmp/* /var/tmp/* + +rm -rf "$HOME/anaconda3/pkgs/*" + +rm -rf /root/.conda /root/.cache diff --git a/Dockerfile b/Dockerfile index 11e09c71..ccab9b9f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,7 +19,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update -qq && \ curl \ unzip \ git \ - vim \ + nano \ htop \ procps \ ca-certificates \ diff --git a/install.sh b/install.sh index c26abfa5..cb784385 100644 --- a/install.sh +++ b/install.sh @@ -126,16 +126,16 @@ fi # 安装构建工具 # Install build tools echo "Installing GCC..." -conda install -c conda-forge gcc=14 -y +conda install -c conda-forge gcc=14 -y --quiet echo "Installing G++..." -conda install -c conda-forge gxx -y +conda install -c conda-forge gxx -y --quiet echo "Installing ffmpeg and cmake..." -conda install ffmpeg cmake make -y +conda install ffmpeg cmake make -y --quiet echo "Installing unzip..." -conda install unzip -y +conda install unzip -y --quiet if [ "$USE_HF" = "true" ]; then echo "Download Model From HuggingFace" @@ -246,9 +246,9 @@ echo "Installing Python dependencies from requirements.txt..." # Refresh environment hash -r -pip install -r extra-req.txt --no-deps +pip install -r extra-req.txt --no-deps --quiet -pip install -r requirements.txt +pip install -r requirements.txt --quiet python -c "import nltk; nltk.download(['averaged_perceptron_tagger','averaged_perceptron_tagger_eng','cmudict'])"