Severian commited on
Commit
c400468
·
1 Parent(s): 781b198

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

Files changed (1) hide show
  1. docker/entrypoint.sh +8 -1
docker/entrypoint.sh CHANGED
@@ -90,7 +90,14 @@ check_redis || {
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
 
90
  # Install Python dependencies
91
  cd /app/api
92
  echo "Installing Python dependencies..."
93
+ if [ -f "requirements.txt" ]; then
94
+ pip install --no-cache-dir -r requirements.txt
95
+ elif [ -f "../requirements.txt" ]; then
96
+ pip install --no-cache-dir -r ../requirements.txt
97
+ else
98
+ echo "Warning: requirements.txt not found in /app/api or /app"
99
+ # Continue anyway as dependencies might be pre-installed in the image
100
+ fi
101
 
102
  # Initialize database if needed
103
  if [ ! -f ".db_initialized" ]; then