kostis-init commited on
Commit
1cb4bfb
Β·
1 Parent(s): 52506ec

fix missing dirs

Browse files
Files changed (2) hide show
  1. Dockerfile +2 -3
  2. src/eval.py +1 -1
Dockerfile CHANGED
@@ -13,10 +13,8 @@ ARG HF_CACHE_DIR_ARG=/app/.cache
13
  ENV HF_HOME=${HF_CACHE_DIR_ARG}
14
  ENV HF_DATASETS_CACHE=${HF_CACHE_DIR_ARG}/datasets
15
  ENV TRANSFORMERS_CACHE=${HF_CACHE_DIR_ARG}/transformers
16
- # Add other HF cache variables if needed (e.g., HUGGINGFACE_HUB_CACHE)
17
 
18
  # Create the cache directories and make them writable
19
- # This also creates parent directories like /app/.cache
20
  RUN mkdir -p ${HF_DATASETS_CACHE} && chmod -R 777 ${HF_CACHE_DIR_ARG}
21
 
22
  COPY setup.sh .
@@ -26,8 +24,9 @@ COPY src/ ./src/
26
 
27
  RUN chmod +x setup.sh && ./setup.sh
28
 
29
- # make the files
30
  RUN mkdir -p /app/local_hf_downloads && chmod 777 /app/local_hf_downloads
 
31
 
32
  # Install Python dependencies
33
  RUN pip install --no-cache-dir -r requirements.txt
 
13
  ENV HF_HOME=${HF_CACHE_DIR_ARG}
14
  ENV HF_DATASETS_CACHE=${HF_CACHE_DIR_ARG}/datasets
15
  ENV TRANSFORMERS_CACHE=${HF_CACHE_DIR_ARG}/transformers
 
16
 
17
  # Create the cache directories and make them writable
 
18
  RUN mkdir -p ${HF_DATASETS_CACHE} && chmod -R 777 ${HF_CACHE_DIR_ARG}
19
 
20
  COPY setup.sh .
 
24
 
25
  RUN chmod +x setup.sh && ./setup.sh
26
 
27
+ # make the directories
28
  RUN mkdir -p /app/local_hf_downloads && chmod 777 /app/local_hf_downloads
29
+ RUN mkdir -p /app/temp_dir_for_exec_code && chmod 777 /app/temp_dir_for_exec_code
30
 
31
  # Install Python dependencies
32
  RUN pip install --no-cache-dir -r requirements.txt
src/eval.py CHANGED
@@ -151,7 +151,7 @@ def exec_code(code: str, timeout=10, modelling_language='cpmpy'):
151
  """
152
 
153
  # create a temp directory to store the temporary file
154
- temp_dir_name = "_temp_dir_for_exec_code"
155
  temp_dir = os.path.join(os.getcwd(), temp_dir_name)
156
  os.makedirs(temp_dir, exist_ok=True)
157
 
 
151
  """
152
 
153
  # create a temp directory to store the temporary file
154
+ temp_dir_name = "temp_dir_for_exec_code"
155
  temp_dir = os.path.join(os.getcwd(), temp_dir_name)
156
  os.makedirs(temp_dir, exist_ok=True)
157