Severian commited on
Commit
302aead
1 Parent(s): 90f57a2

fix: update Dockerfile to properly handle package installations

Browse files
Files changed (1) hide show
  1. 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 with retry mechanism
17
  RUN apt-get update && \
18
  apt-get install -y --no-install-recommends \
19
- tzdata git curl redis-server && \
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 install -y --no-install-recommends \
88
- gcc g++ libc-dev libffi-dev \
89
- libgmp-dev libmpfr-dev libmpc-dev \
90
- libssl-dev
 
 
 
 
 
 
 
 
 
 
 
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 install -y --no-install-recommends \
175
- nodejs npm libgmp-dev libmpfr-dev libmpc-dev libssl-dev \
176
- postgresql-client redis-tools && \
 
 
 
 
 
 
 
 
 
 
177
  pip install --no-cache-dir \
178
- gunicorn \
179
- gevent \
180
- grpcio \
181
- pydantic-settings \
182
- protobuf \
183
- grpcio-tools \
184
- flask \
185
- flask-cors \
186
- Flask-SQLAlchemy==3.1.1 \
187
- Flask-Migrate==4.0.7 \
188
- flask-login \
189
- flask-restful \
190
- flask-limiter \
191
- flask-caching \
192
- flask-jwt-extended \
193
- flask-socketio \
194
- PyYAML \
195
- celery \
196
- redis \
197
- psycopg2-binary \
198
- sqlalchemy \
199
- alembic \
200
- pyjwt \
201
- requests \
202
- numpy \
203
- pandas \
204
- python-dotenv \
205
- pycryptodome \
206
- cryptography \
207
- bcrypt \
208
- python-jose[cryptography] \
209
- passlib \
210
- python-multipart \
211
- gmpy2 \
212
- transformers \
213
- torch \
214
- tensorflow \
215
- sentencepiece \
216
- tokenizers \
217
- nltk \
218
- openai==1.14.0 \
219
- anthropic==0.23.1 \
220
- flask-migrate==4.0.5 \
221
- Pillow \
222
- opencv-python-headless \
223
- scikit-learn \
224
- scipy \
225
- google-cloud-aiplatform \
226
- google-generativeai \
227
- vertexai \
228
- google-cloud-core \
229
- google-api-core \
230
- yarl \
231
- aiohttp \
232
- tritonclient[all] \
233
- cohere==4.43 \
234
- anthropic \
235
- replicate \
236
- aleph-alpha-client \
237
- stability-sdk \
238
- huggingface_hub \
239
- langchain \
240
- langchain-community \
241
- langchain-core \
242
- langchain-openai \
243
- openai==1.14.0 \
244
- Flask-Migrate==4.0.7 \
245
- Flask-SQLAlchemy==3.1.1 && \
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