Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +7 -3
Dockerfile
CHANGED
|
@@ -19,9 +19,13 @@ WORKDIR /app
|
|
| 19 |
COPY requirements.txt /app/
|
| 20 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 21 |
|
| 22 |
-
|
| 23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
|
| 25 |
COPY app.py /app/app.py
|
| 26 |
|
| 27 |
-
CMD ["
|
|
|
|
| 19 |
COPY requirements.txt /app/
|
| 20 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 21 |
|
| 22 |
+
RUN python - <<'PY'
|
| 23 |
+
import sysconfig, pathlib, os
|
| 24 |
+
p = pathlib.Path(sysconfig.get_paths()['purelib'])/'seleniumbase'/'drivers'
|
| 25 |
+
p.mkdir(parents=True, exist_ok=True)
|
| 26 |
+
os.system(f"chmod -R a+rwX {p}")
|
| 27 |
+
PY
|
| 28 |
|
| 29 |
COPY app.py /app/app.py
|
| 30 |
|
| 31 |
+
CMD ["bash","-lc","gunicorn -w 1 --threads 1 -k uvicorn.workers.UvicornWorker --bind 0.0.0.0:$PORT app:app"]
|