-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.base
More file actions
27 lines (21 loc) · 865 Bytes
/
Copy pathDockerfile.base
File metadata and controls
27 lines (21 loc) · 865 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Base Docker image with pre-installed dependencies
# Build this once: gcloud builds submit -f Dockerfile.base --tag gcr.io/research-intel-agents/base:latest --timeout=20m
# Then all service/job/worker images will build much faster
FROM python:3.11-slim
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
gcc \
g++ \
curl \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements and install all Python dependencies
# This is the slow step (10+ minutes) that we want to cache
COPY requirements.txt .
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirements.txt && \
pip install --no-cache-dir arxiv
# Environment variables
ENV PYTHONUNBUFFERED=1
# This base image will be reused by all services/jobs/workers
# They will add: COPY src/ ./src/ and CMD [specific service]