fix: update Dockerfile for dependency management and remove unused packages; clean up inference.py
Browse files- Dockerfile +2 -2
- python/inference.py +0 -3
- python/requirements.txt +0 -1
Dockerfile
CHANGED
|
@@ -3,7 +3,7 @@ FROM golang:1.21-alpine AS builder
|
|
| 3 |
|
| 4 |
WORKDIR /app
|
| 5 |
COPY go.mod go.sum* ./
|
| 6 |
-
RUN go mod download || true
|
| 7 |
|
| 8 |
COPY main.go ./
|
| 9 |
COPY env/ ./env/
|
|
@@ -20,7 +20,7 @@ RUN apt-get update && apt-get install -y supervisor && rm -rf /var/lib/apt/lists
|
|
| 20 |
# Install Python dependencies
|
| 21 |
COPY python/requirements.txt ./requirements.txt
|
| 22 |
RUN pip install --no-cache-dir -r requirements.txt || \
|
| 23 |
-
pip install --no-cache-dir openai httpx pydantic
|
| 24 |
|
| 25 |
# Copy Go binary
|
| 26 |
COPY --from=builder /app/gridmind-server /usr/local/bin/gridmind-server
|
|
|
|
| 3 |
|
| 4 |
WORKDIR /app
|
| 5 |
COPY go.mod go.sum* ./
|
| 6 |
+
RUN go mod download 2>/dev/null || true && go mod verify 2>/dev/null || true
|
| 7 |
|
| 8 |
COPY main.go ./
|
| 9 |
COPY env/ ./env/
|
|
|
|
| 20 |
# Install Python dependencies
|
| 21 |
COPY python/requirements.txt ./requirements.txt
|
| 22 |
RUN pip install --no-cache-dir -r requirements.txt || \
|
| 23 |
+
pip install --no-cache-dir openai httpx pydantic requests fastapi uvicorn python-dotenv
|
| 24 |
|
| 25 |
# Copy Go binary
|
| 26 |
COPY --from=builder /app/gridmind-server /usr/local/bin/gridmind-server
|
python/inference.py
CHANGED
|
@@ -375,9 +375,6 @@ def run_episode(
|
|
| 375 |
elapsed = time.time() - start_time
|
| 376 |
grade = env_client.grade()
|
| 377 |
|
| 378 |
-
success = (total_steps > 0 and total_steps >= step_limit) or last_error is None
|
| 379 |
-
rewards_str = ",".join(f"{r:.2f}" for r in step_rewards)
|
| 380 |
-
|
| 381 |
# Emit [END] with required fields
|
| 382 |
print(
|
| 383 |
f"[END] success={'true' if success else 'false'} steps={total_steps} rewards={rewards_str}",
|
|
|
|
| 375 |
elapsed = time.time() - start_time
|
| 376 |
grade = env_client.grade()
|
| 377 |
|
|
|
|
|
|
|
|
|
|
| 378 |
# Emit [END] with required fields
|
| 379 |
print(
|
| 380 |
f"[END] success={'true' if success else 'false'} steps={total_steps} rewards={rewards_str}",
|
python/requirements.txt
CHANGED
|
@@ -6,4 +6,3 @@ requests>=2.31.0
|
|
| 6 |
httpx>=0.24.0
|
| 7 |
pytest>=7.0.0
|
| 8 |
python-dotenv>=1.0.0
|
| 9 |
-
openenv-core>=0.2.0
|
|
|
|
| 6 |
httpx>=0.24.0
|
| 7 |
pytest>=7.0.0
|
| 8 |
python-dotenv>=1.0.0
|
|
|