Spaces:
Runtime error
Runtime error
Peter Michael Gits Claude commited on
Commit ·
10a540d
1
Parent(s): 0b874cb
Fix persistent OMP_NUM_THREADS override with unset + export
Browse filesv1.4.5 - CRITICAL: OMP_NUM_THREADS still being overridden by HF
- HuggingFace keeps setting OMP_NUM_THREADS='3500m' despite Python override
- Added unset OMP_NUM_THREADS && export OMP_NUM_THREADS=1 in CMD
- Added debug echo to see actual value at startup
- This should prevent libgomp crash: 'Invalid value for environment variable'
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Dockerfile +2 -2
- app.py +1 -1
Dockerfile
CHANGED
|
@@ -59,5 +59,5 @@ EXPOSE 7860
|
|
| 59 |
HEALTHCHECK --interval=60s --timeout=45s --start-period=300s --retries=5 \
|
| 60 |
CMD curl -f http://localhost:7860/health || exit 1
|
| 61 |
|
| 62 |
-
# Run application as non-root user with explicit
|
| 63 |
-
CMD ["sh", "-c", "export OMP_NUM_THREADS=1 && python app.py"]
|
|
|
|
| 59 |
HEALTHCHECK --interval=60s --timeout=45s --start-period=300s --retries=5 \
|
| 60 |
CMD curl -f http://localhost:7860/health || exit 1
|
| 61 |
|
| 62 |
+
# Run application as non-root user with explicit environment override
|
| 63 |
+
CMD ["sh", "-c", "unset OMP_NUM_THREADS && export OMP_NUM_THREADS=1 && echo 'OMP_NUM_THREADS set to:' $OMP_NUM_THREADS && python app.py"]
|
app.py
CHANGED
|
@@ -21,7 +21,7 @@ from fastapi.responses import JSONResponse, HTMLResponse
|
|
| 21 |
import uvicorn
|
| 22 |
|
| 23 |
# Version tracking
|
| 24 |
-
VERSION = "1.4.
|
| 25 |
COMMIT_SHA = "TBD"
|
| 26 |
|
| 27 |
# Configure logging
|
|
|
|
| 21 |
import uvicorn
|
| 22 |
|
| 23 |
# Version tracking
|
| 24 |
+
VERSION = "1.4.5"
|
| 25 |
COMMIT_SHA = "TBD"
|
| 26 |
|
| 27 |
# Configure logging
|