fix: update Dockerfile to properly handle package installations
Browse files- Dockerfile +114 -79
Dockerfile
CHANGED
@@ -13,10 +13,24 @@ ENV NODE_OPTIONS="--max_old_space_size=4096" \
|
|
13 |
PIP_NO_CACHE_DIR=1 \
|
14 |
PIP_DISABLE_PIP_VERSION_CHECK=1
|
15 |
|
16 |
-
# Install base dependencies
|
17 |
RUN apt-get update && \
|
18 |
apt-get install -y --no-install-recommends \
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
rm -f /etc/localtime && \
|
21 |
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && \
|
22 |
echo $TZ > /etc/timezone && \
|
@@ -83,11 +97,22 @@ RUN yarn install --frozen-lockfile && \
|
|
83 |
# ============================================
|
84 |
FROM base AS python-builder
|
85 |
|
86 |
-
# Install build dependencies
|
87 |
-
RUN apt-get
|
88 |
-
|
89 |
-
|
90 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
|
92 |
WORKDIR /app
|
93 |
|
@@ -170,79 +195,89 @@ RUN apt-get update && \
|
|
170 |
mkdir -p /app/api && \
|
171 |
chown -R user:user /app
|
172 |
|
173 |
-
# Install runtime dependencies
|
174 |
-
RUN apt-get
|
175 |
-
|
176 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
177 |
pip install --no-cache-dir \
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
python -m nltk.downloader punkt averaged_perceptron_tagger
|
247 |
|
248 |
# Set up directory structure
|
|
|
13 |
PIP_NO_CACHE_DIR=1 \
|
14 |
PIP_DISABLE_PIP_VERSION_CHECK=1
|
15 |
|
16 |
+
# Install base system dependencies
|
17 |
RUN apt-get update && \
|
18 |
apt-get install -y --no-install-recommends \
|
19 |
+
tzdata \
|
20 |
+
git \
|
21 |
+
curl \
|
22 |
+
redis-server \
|
23 |
+
build-essential \
|
24 |
+
gcc \
|
25 |
+
g++ \
|
26 |
+
libc-dev \
|
27 |
+
libffi-dev \
|
28 |
+
libgmp-dev \
|
29 |
+
libmpfr-dev \
|
30 |
+
libmpc-dev \
|
31 |
+
libssl-dev \
|
32 |
+
make \
|
33 |
+
pkg-config && \
|
34 |
rm -f /etc/localtime && \
|
35 |
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && \
|
36 |
echo $TZ > /etc/timezone && \
|
|
|
97 |
# ============================================
|
98 |
FROM base AS python-builder
|
99 |
|
100 |
+
# Install build dependencies with proper repository update
|
101 |
+
RUN apt-get update && \
|
102 |
+
apt-get install -y --no-install-recommends \
|
103 |
+
build-essential \
|
104 |
+
gcc \
|
105 |
+
g++ \
|
106 |
+
libc6-dev \
|
107 |
+
libffi-dev \
|
108 |
+
libgmp-dev \
|
109 |
+
libmpfr-dev \
|
110 |
+
libmpc-dev \
|
111 |
+
libssl-dev \
|
112 |
+
make \
|
113 |
+
pkg-config && \
|
114 |
+
apt-get clean && \
|
115 |
+
rm -rf /var/lib/apt/lists/*
|
116 |
|
117 |
WORKDIR /app
|
118 |
|
|
|
195 |
mkdir -p /app/api && \
|
196 |
chown -R user:user /app
|
197 |
|
198 |
+
# Install runtime dependencies with proper repository update
|
199 |
+
RUN apt-get update && \
|
200 |
+
apt-get install -y --no-install-recommends \
|
201 |
+
build-essential \
|
202 |
+
nodejs \
|
203 |
+
npm \
|
204 |
+
libgmp-dev \
|
205 |
+
libmpfr-dev \
|
206 |
+
libmpc-dev \
|
207 |
+
libssl-dev \
|
208 |
+
postgresql-client \
|
209 |
+
redis-tools && \
|
210 |
+
apt-get clean && \
|
211 |
+
rm -rf /var/lib/apt/lists/* && \
|
212 |
pip install --no-cache-dir \
|
213 |
+
gunicorn \
|
214 |
+
gevent \
|
215 |
+
grpcio \
|
216 |
+
pydantic-settings \
|
217 |
+
protobuf \
|
218 |
+
grpcio-tools \
|
219 |
+
flask \
|
220 |
+
flask-cors \
|
221 |
+
Flask-SQLAlchemy==3.1.1 \
|
222 |
+
Flask-Migrate==4.0.7 \
|
223 |
+
flask-login \
|
224 |
+
flask-restful \
|
225 |
+
flask-limiter \
|
226 |
+
flask-caching \
|
227 |
+
flask-jwt-extended \
|
228 |
+
flask-socketio \
|
229 |
+
PyYAML \
|
230 |
+
celery \
|
231 |
+
redis \
|
232 |
+
psycopg2-binary \
|
233 |
+
sqlalchemy \
|
234 |
+
alembic \
|
235 |
+
pyjwt \
|
236 |
+
requests \
|
237 |
+
numpy \
|
238 |
+
pandas \
|
239 |
+
python-dotenv \
|
240 |
+
pycryptodome \
|
241 |
+
cryptography \
|
242 |
+
bcrypt \
|
243 |
+
python-jose[cryptography] \
|
244 |
+
passlib \
|
245 |
+
python-multipart \
|
246 |
+
gmpy2 \
|
247 |
+
transformers \
|
248 |
+
torch \
|
249 |
+
tensorflow \
|
250 |
+
sentencepiece \
|
251 |
+
tokenizers \
|
252 |
+
nltk \
|
253 |
+
openai==1.14.0 \
|
254 |
+
anthropic==0.23.1 \
|
255 |
+
flask-migrate==4.0.5 \
|
256 |
+
Pillow \
|
257 |
+
opencv-python-headless \
|
258 |
+
scikit-learn \
|
259 |
+
scipy \
|
260 |
+
google-cloud-aiplatform \
|
261 |
+
google-generativeai \
|
262 |
+
vertexai \
|
263 |
+
google-cloud-core \
|
264 |
+
google-api-core \
|
265 |
+
yarl \
|
266 |
+
aiohttp \
|
267 |
+
tritonclient[all] \
|
268 |
+
cohere==4.43 \
|
269 |
+
anthropic \
|
270 |
+
replicate \
|
271 |
+
aleph-alpha-client \
|
272 |
+
stability-sdk \
|
273 |
+
huggingface_hub \
|
274 |
+
langchain \
|
275 |
+
langchain-community \
|
276 |
+
langchain-core \
|
277 |
+
langchain-openai \
|
278 |
+
openai==1.14.0 \
|
279 |
+
Flask-Migrate==4.0.7 \
|
280 |
+
Flask-SQLAlchemy==3.1.1 && \
|
281 |
python -m nltk.downloader punkt averaged_perceptron_tagger
|
282 |
|
283 |
# Set up directory structure
|