Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b41d9c2

Browse files
committed
Add cache removal commands
1 parent df8d112 commit b41d9c2

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

‎Dockerfile‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM python:3.9.17-slim-bullseye
22

33
#Special gifts for mainland China users :)
44
#Change to your own preferenced mirrors if you wish, just uncomment them is fine too.
5-
#Below is pip mirror and apt mirror setup
5+
#Below is apt mirror setup
66
RUN sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list &&\
77
apt update &&\
88
apt install -y git curl wget build-essential gcc clang g++ make &&\
@@ -12,12 +12,15 @@ RUN sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list &&\
1212

1313
WORKDIR /app
1414

15-
RUN npm config set registry https://registry.npm.taobao.org &&\
16-
npm install -g @mermaid-js/mermaid-cli &&\
15+
RUN npm install -g @mermaid-js/mermaid-cli &&\
1716
git clone https://github.com/geekan/metagpt
1817
RUN cd metagpt &&\
1918
mkdir workspace &&\
19+
#This sets the pip mirror, you can delete it if you need to.
2020
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/ &&\
21-
pip install -r requirements.txt &&\
21+
pip install -r requirements.txt --no-cache-dir &&\
2222
python setup.py install
2323

24+
RUN pip cache purge &&\
25+
apt autoclean
26+

0 commit comments

Comments
 (0)