jameszokah commited on
Commit
08dd4fb
·
1 Parent(s): b66c69a

Refactor Dockerfile: streamline directory creation by removing redundant model paths, prioritize copying the entire app directory, and enhance debug verification for model files.

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -6
Dockerfile CHANGED
@@ -17,8 +17,7 @@ RUN apt-get update && apt-get install -y \
17
  && rm -rf /var/lib/apt/lists/*
18
 
19
  # Create necessary directories first
20
- RUN mkdir -p /app/app/models \
21
- /app/storage/audio \
22
  /app/storage/text \
23
  /app/storage/temp
24
 
@@ -26,14 +25,13 @@ RUN mkdir -p /app/app/models \
26
  COPY requirements.txt .
27
  RUN pip install --no-cache-dir -r requirements.txt
28
 
29
- # Copy models files first to ensure they exist
30
- COPY app/models/database.py /app/app/models/
31
- COPY app/models/__init__.py /app/app/models/
32
 
33
  # Debug: Verify models files were copied
34
  RUN ls -la /app/app/models
35
 
36
- # Copy the rest of the application code
37
  COPY . .
38
 
39
  # Set up permissions
 
17
  && rm -rf /var/lib/apt/lists/*
18
 
19
  # Create necessary directories first
20
+ RUN mkdir -p /app/storage/audio \
 
21
  /app/storage/text \
22
  /app/storage/temp
23
 
 
25
  COPY requirements.txt .
26
  RUN pip install --no-cache-dir -r requirements.txt
27
 
28
+ # Copy the app directory first
29
+ COPY app /app/app
 
30
 
31
  # Debug: Verify models files were copied
32
  RUN ls -la /app/app/models
33
 
34
+ # Copy the rest of the application code (scripts, alembic, etc.)
35
  COPY . .
36
 
37
  # Set up permissions