Zach Wentz commited on
Commit
67a5ae3
·
1 Parent(s): 8ab8289

🤖 Deploy chat_env environment - 2025-10-19 22:49:23

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -0
Dockerfile CHANGED
@@ -32,6 +32,14 @@ FROM base-builder
32
  # Install additional dependencies for ChatEnvironment
33
  RUN pip install --no-cache-dir torch transformers
34
 
 
 
 
 
 
 
 
 
35
 
36
  # Copy only what's needed for this environment
37
  COPY src/core/ /app/src/core/
 
32
  # Install additional dependencies for ChatEnvironment
33
  RUN pip install --no-cache-dir torch transformers
34
 
35
+ # Set up cache directory for Hugging Face models
36
+ RUN mkdir -p /.cache && chmod 777 /.cache
37
+ ENV HF_HOME=/.cache
38
+ ENV TRANSFORMERS_CACHE=/.cache
39
+
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/