Update Dockerfile
Browse files- Dockerfile +103 -11
Dockerfile
CHANGED
@@ -11,8 +11,6 @@ ENV NODE_VERSION=20.11.0 \
|
|
11 |
POETRY_VIRTUALENVS_CREATE=false \
|
12 |
POETRY_CACHE_DIR=/cache/poetry
|
13 |
|
14 |
-
WORKDIR /app/api
|
15 |
-
|
16 |
# Install system dependencies
|
17 |
RUN apt-get update && apt-get install -y \
|
18 |
curl \
|
@@ -27,15 +25,6 @@ RUN apt-get update && apt-get install -y \
|
|
27 |
&& npm install -g npm@latest \
|
28 |
&& rm -rf /var/lib/apt/lists/*
|
29 |
|
30 |
-
# Install Poetry
|
31 |
-
RUN pip install poetry==1.8.4
|
32 |
-
|
33 |
-
# Copy dependency files
|
34 |
-
COPY pyproject.toml poetry.lock ./
|
35 |
-
|
36 |
-
# Install dependencies
|
37 |
-
RUN poetry install --no-dev --no-root
|
38 |
-
|
39 |
# Pull official images
|
40 |
FROM langgenius/dify-web:latest AS web
|
41 |
FROM langgenius/dify-api:latest AS api
|
@@ -55,6 +44,109 @@ RUN mkdir -p api web /data/storage && \
|
|
55 |
COPY --from=web --chown=user /app/web /app/web/
|
56 |
COPY --from=api --chown=user /app/api /app/api/
|
57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
# Create symlink for persistent storage
|
59 |
RUN ln -s /data/storage /app/api/storage
|
60 |
|
|
|
11 |
POETRY_VIRTUALENVS_CREATE=false \
|
12 |
POETRY_CACHE_DIR=/cache/poetry
|
13 |
|
|
|
|
|
14 |
# Install system dependencies
|
15 |
RUN apt-get update && apt-get install -y \
|
16 |
curl \
|
|
|
25 |
&& npm install -g npm@latest \
|
26 |
&& rm -rf /var/lib/apt/lists/*
|
27 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
# Pull official images
|
29 |
FROM langgenius/dify-web:latest AS web
|
30 |
FROM langgenius/dify-api:latest AS api
|
|
|
44 |
COPY --from=web --chown=user /app/web /app/web/
|
45 |
COPY --from=api --chown=user /app/api /app/api/
|
46 |
|
47 |
+
|
48 |
+
RUN pip install --no-cache-dir \
|
49 |
+
gunicorn \
|
50 |
+
gevent \
|
51 |
+
grpcio \
|
52 |
+
grpcio-tools \
|
53 |
+
pydantic-settings \
|
54 |
+
pydantic \
|
55 |
+
flask \
|
56 |
+
flask-cors \
|
57 |
+
flask-sqlalchemy \
|
58 |
+
flask-migrate \
|
59 |
+
flask-login \
|
60 |
+
flask-limiter \
|
61 |
+
flask-restful \
|
62 |
+
fastapi \
|
63 |
+
uvicorn \
|
64 |
+
python-multipart \
|
65 |
+
python-jose[cryptography] \
|
66 |
+
passlib[bcrypt] \
|
67 |
+
sqlalchemy \
|
68 |
+
psycopg2-binary \
|
69 |
+
alembic \
|
70 |
+
redis \
|
71 |
+
celery \
|
72 |
+
flower \
|
73 |
+
pytest \
|
74 |
+
pytest-cov \
|
75 |
+
pytest-asyncio \
|
76 |
+
httpx \
|
77 |
+
PyYAML \
|
78 |
+
python-dotenv \
|
79 |
+
requests \
|
80 |
+
aiohttp \
|
81 |
+
boto3 \
|
82 |
+
minio \
|
83 |
+
tiktoken \
|
84 |
+
openai \
|
85 |
+
tenacity \
|
86 |
+
cryptography \
|
87 |
+
gmpy2==2.2.1 \
|
88 |
+
transformers \
|
89 |
+
torch \
|
90 |
+
sentencepiece \
|
91 |
+
protobuf \
|
92 |
+
anthropic==0.23.1 \
|
93 |
+
authlib==1.3.1 \
|
94 |
+
azure-ai-inference==1.0.0b3 \
|
95 |
+
azure-ai-ml==1.20.0 \
|
96 |
+
azure-identity==1.16.1 \
|
97 |
+
beautifulsoup4==4.12.2 \
|
98 |
+
bs4==0.0.1 \
|
99 |
+
cachetools==5.3.0 \
|
100 |
+
chardet==5.1.0 \
|
101 |
+
cohere==5.2.4 \
|
102 |
+
dashscope[tokenizer]==1.17.0 \
|
103 |
+
fal-client==0.5.6 \
|
104 |
+
flask-compress==1.14 \
|
105 |
+
google-ai-generativelanguage==0.6.9 \
|
106 |
+
google-api-core==2.18.0 \
|
107 |
+
google-api-python-client==2.90.0 \
|
108 |
+
google-auth==2.29.0 \
|
109 |
+
google-auth-httplib2==0.2.0 \
|
110 |
+
google-cloud-aiplatform==1.49.0 \
|
111 |
+
google-generativeai==0.8.1 \
|
112 |
+
googleapis-common-protos==1.63.0 \
|
113 |
+
huggingface-hub==0.16.4 \
|
114 |
+
jieba==0.42.1 \
|
115 |
+
langfuse==2.51.3 \
|
116 |
+
langsmith==0.1.77 \
|
117 |
+
mailchimp-transactional==1.0.50 \
|
118 |
+
markdown==3.5.1 \
|
119 |
+
nomic==3.1.2 \
|
120 |
+
novita-client==0.5.7 \
|
121 |
+
numpy==1.26.4 \
|
122 |
+
oci==2.135.1 \
|
123 |
+
openpyxl==3.1.5 \
|
124 |
+
pandas[performance,excel]==2.2.2 \
|
125 |
+
pycryptodome==3.19.1 \
|
126 |
+
pydantic-extra-types==2.9.0 \
|
127 |
+
pyjwt==2.8.0 \
|
128 |
+
pypdfium2==4.17.0 \
|
129 |
+
python-docx==1.1.0 \
|
130 |
+
readabilipy==0.2.0 \
|
131 |
+
redis[hiredis]==5.0.3 \
|
132 |
+
replicate==0.22.0 \
|
133 |
+
resend==0.7.0 \
|
134 |
+
sagemaker==2.231.0 \
|
135 |
+
scikit-learn==1.5.1 \
|
136 |
+
sentry-sdk[flask]==1.44.1 \
|
137 |
+
starlette==0.41.0 \
|
138 |
+
tencentcloud-sdk-python-hunyuan==3.0.1158 \
|
139 |
+
tokenizers==0.15.0 \
|
140 |
+
unstructured[docx,epub,md,msg,ppt,pptx]==0.16.1 \
|
141 |
+
validators==0.21.0 \
|
142 |
+
volcengine-python-sdk[ark]==1.0.98 \
|
143 |
+
websocket-client==1.7.0 \
|
144 |
+
werkzeug==3.0.1 \
|
145 |
+
xinference-client==0.15.2 \
|
146 |
+
yarl==1.9.4 \
|
147 |
+
youtube-transcript-api==0.6.2 \
|
148 |
+
zhipuai==2.1.5
|
149 |
+
|
150 |
# Create symlink for persistent storage
|
151 |
RUN ln -s /data/storage /app/api/storage
|
152 |
|