alessandro trinca tornidor
commited on
Commit
•
74dd214
1
Parent(s):
8980653
ci: try fixing the huggingface run error using directly the uvicorn command
Browse files- Dockerfile +2 -2
- README.md +2 -2
Dockerfile
CHANGED
@@ -227,7 +227,7 @@ RUN ls -l ${WORKDIR_ROOT}/.venv/bin/activate
|
|
227 |
# "source", "/var/task/.venv/bin/activate", "&&",
|
228 |
# "uvicorn", "app:app", "--host","0.0.0.0", "--port", "7860"
|
229 |
#]
|
230 |
-
|
231 |
-
CMD ["
|
232 |
# HEALTHCHECK --interval=30s --timeout=900s --start-period=5s --retries=3 CMD "python -c 'import requests; r1 = requests.get(\"http://localhost:7860/health\"); print(r1.status_code); r2 = requests.get(\"http://localhost:7860/health_models\"); print(f\"status health:{r1.status_code}, health_models:{r2.status_code}!\"); exit(0) if r1.status_code == 200 and r2.status_code == 200 else exit(1)'"
|
233 |
HEALTHCHECK --interval=10s --timeout=1080s --start-period=10s --start-interval=10s --retries=3 CMD [ "python", "healthcheck.py" ]
|
|
|
227 |
# "source", "/var/task/.venv/bin/activate", "&&",
|
228 |
# "uvicorn", "app:app", "--host","0.0.0.0", "--port", "7860"
|
229 |
#]
|
230 |
+
CMD ["/usr/bin/bash", "-c", "source /var/task/.venv/bin/activate && python -m uvicorn app:app --host 0.0.0.0 --port 7860"]
|
231 |
+
# CMD ["python", "-m", "uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
232 |
# HEALTHCHECK --interval=30s --timeout=900s --start-period=5s --retries=3 CMD "python -c 'import requests; r1 = requests.get(\"http://localhost:7860/health\"); print(r1.status_code); r2 = requests.get(\"http://localhost:7860/health_models\"); print(f\"status health:{r1.status_code}, health_models:{r2.status_code}!\"); exit(0) if r1.status_code == 200 and r2.status_code == 200 else exit(1)'"
|
233 |
HEALTHCHECK --interval=10s --timeout=1080s --start-period=10s --start-interval=10s --retries=3 CMD [ "python", "healthcheck.py" ]
|
README.md
CHANGED
@@ -53,12 +53,12 @@ VITE_INDEX_URL="/custom-url"
|
|
53 |
To execute the you can simply run from the root project folder:
|
54 |
|
55 |
- `python app.py`
|
56 |
-
- `uvicorn app:app --host 0.0.0.0 --port 7860`
|
57 |
|
58 |
It's also possible to make and run a docker build:
|
59 |
|
60 |
- `docker build . -t registry.gitlab.com/aletrn/samgis-lisa-on-cuda --progress=plain`
|
61 |
-
- `docker run -d --name samgis-lisa
|
62 |
|
63 |
## About HuggingFace space dependencies
|
64 |
|
|
|
53 |
To execute the you can simply run from the root project folder:
|
54 |
|
55 |
- `python app.py`
|
56 |
+
- `python -m uvicorn app:app --host 0.0.0.0 --port 7860`
|
57 |
|
58 |
It's also possible to make and run a docker build:
|
59 |
|
60 |
- `docker build . -t registry.gitlab.com/aletrn/samgis-lisa-on-cuda --progress=plain`
|
61 |
+
- `docker run -d --name samgis-lisa -p 7860:7860 --gpus all --ipc=host --ulimit memlock=-1 --ulimit stack=67108864 registry.gitlab.com/aletrn/samgis-lisa; docker logs -f samgis-lisa-on-cuda`
|
62 |
|
63 |
## About HuggingFace space dependencies
|
64 |
|