Zach Wentz commited on
Commit
2340139
·
1 Parent(s): 9cca8c4

🤖 Deploy coding_env environment - 2025-10-19 22:27:09

Browse files
Files changed (1) hide show
  1. Dockerfile +24 -8
Dockerfile CHANGED
@@ -4,14 +4,30 @@
4
  # This source code is licensed under the BSD-style license found in the
5
  # LICENSE file in the root directory of this source tree.
6
 
7
- # Use the standard openenv base image
8
- # Built from: docker build -t openenv-base:latest -f src/core/containers/images/Dockerfile .
9
- # In GitHub Actions, this is overridden to use the GHCR base image
10
- ARG BASE_IMAGE=openenv-base:latest
11
- FROM ${BASE_IMAGE}
12
-
13
- # Install smolagents for code execution
14
- RUN pip install --no-cache-dir smolagents
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
 
16
  # Copy only what's needed for this environment
17
  COPY src/core/ /app/src/core/
 
4
  # This source code is licensed under the BSD-style license found in the
5
  # LICENSE file in the root directory of this source tree.
6
 
7
+ # Multi-stage build: First stage builds the base image
8
+ FROM python:3.11-slim as base-builder
9
+
10
+ # Install system dependencies
11
+ RUN apt-get update && apt-get install -y --no-install-recommends \
12
+ curl \
13
+ && rm -rf /var/lib/apt/lists/*
14
+
15
+ # Install Python dependencies that all environments need
16
+ RUN pip install --no-cache-dir \
17
+ fastapi>=0.104.0 \
18
+ "uvicorn[standard]>=0.24.0" \
19
+ requests>=2.25.0 \
20
+ wsproto>=1.0.0
21
+
22
+ # Set working directory
23
+ WORKDIR /app
24
+
25
+ # Default environment variables
26
+ ENV PYTHONPATH=/app/src
27
+ ENV PYTHONUNBUFFERED=1
28
+
29
+ # Second stage: Use the built base image
30
+ FROM base-builder
31
 
32
  # Copy only what's needed for this environment
33
  COPY src/core/ /app/src/core/