plan291037 commited on
Commit
50194ae
·
verified ·
1 Parent(s): e6459b9

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +1 -8
Dockerfile CHANGED
@@ -24,14 +24,7 @@ RUN mkdir -p /app/downloaded_files /tmp/.cache /tmp/selenium && \
24
  COPY requirements.txt .
25
  RUN pip install --no-cache-dir -r requirements.txt
26
 
27
- RUN python - <<'PY'\n\
28
- import sys, pathlib\n\
29
- p = pathlib.Path(sys.executable).parent.parent / 'lib' / f'python{sys.version_info.major}.{sys.version_info.minor}' / 'site-packages' / 'seleniumbase' / 'drivers'\n\
30
- print('Fixing perms under:', p)\n\
31
- p.mkdir(parents=True, exist_ok=True)\n\
32
- import os\n\
33
- os.system(f'chmod -R a+rwX {p}')\n\
34
- PY
35
 
36
  RUN chmod a+rx /usr/bin/chromium /usr/bin/chromedriver
37
 
 
24
  COPY requirements.txt .
25
  RUN pip install --no-cache-dir -r requirements.txt
26
 
27
+ RUN python -c "import os, sysconfig, pathlib; site=pathlib.Path(sysconfig.get_paths()['purelib']); p=site/'seleniumbase'/'drivers'; print('Fixing perms under:', p); p.mkdir(parents=True, exist_ok=True); os.system(f'chmod -R a+rwX {p}')"
 
 
 
 
 
 
 
28
 
29
  RUN chmod a+rx /usr/bin/chromium /usr/bin/chromedriver
30