Commit
Β·
4131431
1
Parent(s):
ef69efc
Fix cache directory permissions: use /tmp instead of /app/cache
Browse files- Dockerfile +3 -3
- start.sh +4 -5
Dockerfile
CHANGED
|
@@ -29,11 +29,11 @@ COPY . .
|
|
| 29 |
# Make startup script executable
|
| 30 |
RUN chmod +x start.sh
|
| 31 |
|
| 32 |
-
# Create cache
|
| 33 |
-
RUN mkdir -p /
|
| 34 |
|
| 35 |
# Set environment variables
|
| 36 |
-
ENV HF_HOME=/
|
| 37 |
ENV PYTHONPATH=/app
|
| 38 |
ENV NUMBA_CACHE_DIR=/tmp/numba_cache
|
| 39 |
ENV NUMBA_DISABLE_JIT=1
|
|
|
|
| 29 |
# Make startup script executable
|
| 30 |
RUN chmod +x start.sh
|
| 31 |
|
| 32 |
+
# Create cache directories with proper permissions
|
| 33 |
+
RUN mkdir -p /tmp/hf_cache /tmp/numba_cache && chmod 777 /tmp/hf_cache /tmp/numba_cache
|
| 34 |
|
| 35 |
# Set environment variables
|
| 36 |
+
ENV HF_HOME=/tmp/hf_cache
|
| 37 |
ENV PYTHONPATH=/app
|
| 38 |
ENV NUMBA_CACHE_DIR=/tmp/numba_cache
|
| 39 |
ENV NUMBA_DISABLE_JIT=1
|
start.sh
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
#!/bin/bash
|
| 2 |
-
|
| 3 |
|
| 4 |
echo "π Starting Carsa AI Backend..."
|
| 5 |
echo "π Working directory: $(pwd)"
|
|
@@ -30,12 +30,11 @@ except ImportError as e:
|
|
| 30 |
"
|
| 31 |
|
| 32 |
# Create cache directories with proper permissions
|
| 33 |
-
mkdir -p /
|
| 34 |
-
|
| 35 |
-
echo "π Cache directories created with proper permissions"
|
| 36 |
|
| 37 |
# Set environment variables
|
| 38 |
-
export HF_HOME=/
|
| 39 |
export PYTHONPATH=/app
|
| 40 |
export NUMBA_CACHE_DIR=/tmp/numba_cache
|
| 41 |
export NUMBA_DISABLE_JIT=1
|
|
|
|
| 1 |
#!/bin/bash
|
| 2 |
+
# Don't exit on errors - we'll handle them gracefully
|
| 3 |
|
| 4 |
echo "π Starting Carsa AI Backend..."
|
| 5 |
echo "π Working directory: $(pwd)"
|
|
|
|
| 30 |
"
|
| 31 |
|
| 32 |
# Create cache directories with proper permissions
|
| 33 |
+
mkdir -p /tmp/hf_cache /tmp/numba_cache
|
| 34 |
+
echo "π Cache directories ready: /tmp/hf_cache, /tmp/numba_cache"
|
|
|
|
| 35 |
|
| 36 |
# Set environment variables
|
| 37 |
+
export HF_HOME=/tmp/hf_cache
|
| 38 |
export PYTHONPATH=/app
|
| 39 |
export NUMBA_CACHE_DIR=/tmp/numba_cache
|
| 40 |
export NUMBA_DISABLE_JIT=1
|