github-actions[bot] commited on
Commit
60b1f44
·
1 Parent(s): 0d07eb9

🤖 Deploy chat_env environment - 2025-10-21 02:05:09

Browse files
Dockerfile CHANGED
@@ -4,31 +4,8 @@
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 and add environment-specific dependencies
30
- FROM base-builder
31
-
32
  # Install additional dependencies for ChatEnvironment
33
  RUN pip install --no-cache-dir torch transformers
34
 
@@ -40,7 +17,6 @@ ENV TRANSFORMERS_CACHE=/.cache
40
  # Pre-download the GPT-2 model to avoid permission issues during runtime
41
  RUN python -c "from transformers import GPT2Tokenizer; GPT2Tokenizer.from_pretrained('gpt2')"
42
 
43
-
44
  # Copy only what's needed for this environment
45
  COPY src/core/ /app/src/core/
46
  COPY src/envs/chat_env/ /app/src/envs/chat_env/
 
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 specified openenv-base image
8
+ FROM openenv-base:sha-7dd8148
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  # Install additional dependencies for ChatEnvironment
10
  RUN pip install --no-cache-dir torch transformers
11
 
 
17
  # Pre-download the GPT-2 model to avoid permission issues during runtime
18
  RUN python -c "from transformers import GPT2Tokenizer; GPT2Tokenizer.from_pretrained('gpt2')"
19
 
 
20
  # Copy only what's needed for this environment
21
  COPY src/core/ /app/src/core/
22
  COPY src/envs/chat_env/ /app/src/envs/chat_env/
src/core/__pycache__/__init__.cpython-311.pyc DELETED
Binary file (400 Bytes)
 
src/core/__pycache__/__init__.cpython-313.pyc DELETED
Binary file (383 Bytes)
 
src/core/__pycache__/http_env_client.cpython-311.pyc DELETED
Binary file (7.68 kB)
 
src/core/__pycache__/types.cpython-311.pyc DELETED
Binary file (1.09 kB)
 
src/core/containers/__pycache__/__init__.cpython-311.pyc DELETED
Binary file (206 Bytes)
 
src/core/containers/runtime/__pycache__/__init__.cpython-311.pyc DELETED
Binary file (389 Bytes)
 
src/core/containers/runtime/__pycache__/providers.cpython-311.pyc DELETED
Binary file (10.9 kB)
 
src/core/env_server/__pycache__/__init__.cpython-311.pyc DELETED
Binary file (898 Bytes)
 
src/core/env_server/__pycache__/__init__.cpython-313.pyc DELETED
Binary file (940 Bytes)
 
src/core/env_server/__pycache__/base_transforms.cpython-311.pyc DELETED
Binary file (1.67 kB)
 
src/core/env_server/__pycache__/base_transforms.cpython-313.pyc DELETED
Binary file (1.57 kB)
 
src/core/env_server/__pycache__/http_server.cpython-311.pyc DELETED
Binary file (9.2 kB)
 
src/core/env_server/__pycache__/http_server.cpython-313.pyc DELETED
Binary file (7.14 kB)
 
src/core/env_server/__pycache__/interfaces.cpython-311.pyc DELETED
Binary file (5.22 kB)
 
src/core/env_server/__pycache__/interfaces.cpython-313.pyc DELETED
Binary file (4.68 kB)
 
src/core/env_server/__pycache__/types.cpython-311.pyc DELETED
Binary file (2.39 kB)
 
src/core/env_server/__pycache__/types.cpython-313.pyc DELETED
Binary file (2.1 kB)
 
src/core/env_server/__pycache__/web_interface.cpython-311.pyc DELETED
Binary file (29.9 kB)
 
src/core/env_server/web_interface.py CHANGED
@@ -262,6 +262,13 @@ class WebInterfaceManager:
262
  processed_data[key] = torch.tensor(value, dtype=torch.long)
263
  else:
264
  processed_data[key] = value
 
 
 
 
 
 
 
265
  else:
266
  processed_data[key] = value
267
 
 
262
  processed_data[key] = torch.tensor(value, dtype=torch.long)
263
  else:
264
  processed_data[key] = value
265
+ elif key == "action_id" and isinstance(value, str):
266
+ # Convert action_id from string to int
267
+ try:
268
+ processed_data[key] = int(value)
269
+ except ValueError:
270
+ # If conversion fails, keep original value
271
+ processed_data[key] = value
272
  else:
273
  processed_data[key] = value
274