forked from geekan/MetaGPT
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request geekan#29 from voidking/pr
Optimize Dockerfile and README
- Loading branch information
Showing
2 changed files
with
51 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,34 @@ | ||
# This Dockerfile is friendly to users in Chinese Mainland :) | ||
# For users outside mainland China, feel free to modify or delete them :) | ||
|
||
# Use a base image with Python 3.9.17 slim version (Bullseye) | ||
FROM python:3.9.17-slim-bullseye | ||
|
||
#Special gifts for mainland China users :) | ||
#Change to your own preferenced mirrors if you wish, just uncomment them is fine too. | ||
#Below is apt mirror setup. | ||
# Install Debian software needed by MetaGPT | ||
RUN sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list &&\ | ||
apt update &&\ | ||
apt update &&\ | ||
apt install -y git curl wget build-essential gcc clang g++ make &&\ | ||
curl -sL https://deb.nodesource.com/setup_19.x | bash - &&\ | ||
apt install -y nodejs | ||
apt install -y nodejs &&\ | ||
apt-get clean | ||
|
||
# Set the working directory to /app | ||
WORKDIR /app | ||
#This sets npm mirror url. | ||
|
||
# Install Mermaid CLI globally and clone the MetaGPT repository | ||
RUN npm config set registry https://registry.npm.taobao.org &&\ | ||
npm install -g @mermaid-js/mermaid-cli &&\ | ||
npm cache clean --force &&\ | ||
git clone https://github.com/geekan/metagpt | ||
|
||
# Install Python dependencies and install MetaGPT | ||
RUN cd metagpt &&\ | ||
mkdir workspace &&\ | ||
#This sets the pip mirror url. | ||
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/ &&\ | ||
pip install -r requirements.txt --no-cache-dir &&\ | ||
pip install -r requirements.txt &&\ | ||
pip cache purge &&\ | ||
python setup.py install | ||
|
||
RUN pip cache purge &&\ | ||
apt autoclean | ||
|
||
# Running with an infinite loop using the tail command | ||
CMD ["sh", "-c", "tail -f /dev/null"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters