Spaces:
Paused
Paused
fix: add Python dependencies installation
Browse files- Add pip install before running Flask migrations
- Fix openai module not found error
- Improve error handling for database initialization
- Add proper working directory management
- docker/entrypoint.sh +5 -1
docker/entrypoint.sh
CHANGED
|
@@ -87,8 +87,12 @@ check_redis || {
|
|
| 87 |
exit 1
|
| 88 |
}
|
| 89 |
|
| 90 |
-
#
|
| 91 |
cd /app/api
|
|
|
|
|
|
|
|
|
|
|
|
|
| 92 |
if [ ! -f ".db_initialized" ]; then
|
| 93 |
echo "Running database migrations..."
|
| 94 |
flask db upgrade
|
|
|
|
| 87 |
exit 1
|
| 88 |
}
|
| 89 |
|
| 90 |
+
# Install Python dependencies
|
| 91 |
cd /app/api
|
| 92 |
+
echo "Installing Python dependencies..."
|
| 93 |
+
pip install -r requirements.txt
|
| 94 |
+
|
| 95 |
+
# Initialize database if needed
|
| 96 |
if [ ! -f ".db_initialized" ]; then
|
| 97 |
echo "Running database migrations..."
|
| 98 |
flask db upgrade
|