rishab1090 commited on
Commit
fd140ce
·
verified ·
1 Parent(s): 475a96c

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -8
Dockerfile CHANGED
@@ -3,11 +3,11 @@ FROM python:3.10-slim
3
  # Set working directory
4
  WORKDIR /app
5
 
6
- # Avoid .pyc files and enable live logging
7
  ENV PYTHONDONTWRITEBYTECODE=1
8
  ENV PYTHONUNBUFFERED=1
9
 
10
- # System dependencies
11
  RUN apt-get update && apt-get install -y \
12
  build-essential \
13
  libglib2.0-0 \
@@ -17,14 +17,14 @@ RUN apt-get update && apt-get install -y \
17
  libgl1 \
18
  && rm -rf /var/lib/apt/lists/*
19
 
20
- # Copy everything
21
  COPY . .
22
- WORKDIR /app
23
- COPY 3.keras /app/
24
- RUN chmod 644 /app/2.keras
25
 
26
- # Set model file permissions at build time
 
27
 
 
 
28
 
29
  # Install Python dependencies
30
  RUN pip install --no-cache-dir --upgrade pip \
@@ -33,5 +33,5 @@ RUN pip install --no-cache-dir --upgrade pip \
33
  # Expose port
34
  EXPOSE 7860
35
 
36
- # Run app
37
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
3
  # Set working directory
4
  WORKDIR /app
5
 
6
+ # Prevent .pyc files
7
  ENV PYTHONDONTWRITEBYTECODE=1
8
  ENV PYTHONUNBUFFERED=1
9
 
10
+ # Install system dependencies
11
  RUN apt-get update && apt-get install -y \
12
  build-essential \
13
  libglib2.0-0 \
 
17
  libgl1 \
18
  && rm -rf /var/lib/apt/lists/*
19
 
20
+ # Copy all project files including .keras
21
  COPY . .
 
 
 
22
 
23
+ # Set read permissions explicitly
24
+ RUN chmod 644 /app/3.keras
25
 
26
+ # Or if you placed it inside a folder like /app/models
27
+ # RUN chmod 644 /app/models/3.keras
28
 
29
  # Install Python dependencies
30
  RUN pip install --no-cache-dir --upgrade pip \
 
33
  # Expose port
34
  EXPOSE 7860
35
 
36
+ # Start app
37
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]