WebashalarForML commited on
Commit
f3e5d5a
·
verified ·
1 Parent(s): b5f1353

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -9
Dockerfile CHANGED
@@ -18,17 +18,15 @@ RUN apt-get update && \
18
  apt-get install -y --no-install-recommends \
19
  llvm \
20
  clang \
21
- # Essential build tools
22
  build-essential \
23
- # Libraries for llvmlite and cffi
24
  libedit-dev \
25
  libffi-dev \
26
- # Python dev headers, often needed for compiling Python extensions
27
  python3-dev \
28
- # --- NEW: Install OpenCV dependencies for graphical libraries ---
29
  libgl1-mesa-glx \
30
  libsm6 \
31
  libxrender1 \
 
 
32
  # --- End NEW ---
33
  && \
34
  rm -rf /var/lib/apt/lists/*
@@ -45,21 +43,18 @@ RUN pip install --no-cache-dir numpy==1.22.4
45
  # REMOVED: && python -m spacy download en_core_web_sm
46
  RUN pip install --no-cache-dir -r requirements.txt
47
 
48
- # --- NEW: Move COPY . /app/ here, after all apt-get and pip installs ---
49
  # Copy the rest of the application code to /app
50
  # This should be done AFTER all dependencies are installed
51
  COPY . /app/
52
- # --- End NEW ---
53
 
54
  # Create necessary directories with appropriate permissions
55
  RUN mkdir -p /app/cache /app/uploads /app/results /app/checkpoints /app/temp \
56
  && chmod -R 777 /app/cache /app/uploads /app/results /app/checkpoints /app/temp
57
 
58
- # Ensure all relevant directories have the correct permissions (redundant for /app itself if contents are copied later)
59
- # This line is now effectively ensuring any newly created files/directories *after* the initial copy also have permissions.
60
  RUN chmod -R 777 /app
61
 
62
- # Disable Numba's on-disk caching (often problematic in containers) - already present but keeping it for clarity
63
  ENV NUMBA_DISABLE_PER_FILE_CACHE=1
64
 
65
  # Expose the port the app runs on
 
18
  apt-get install -y --no-install-recommends \
19
  llvm \
20
  clang \
 
21
  build-essential \
 
22
  libedit-dev \
23
  libffi-dev \
 
24
  python3-dev \
 
25
  libgl1-mesa-glx \
26
  libsm6 \
27
  libxrender1 \
28
+ # --- NEW: Add libglib2.0-0 for libgthread-2.0.so.0 ---
29
+ libglib2.0-0 \
30
  # --- End NEW ---
31
  && \
32
  rm -rf /var/lib/apt/lists/*
 
43
  # REMOVED: && python -m spacy download en_core_web_sm
44
  RUN pip install --no-cache-dir -r requirements.txt
45
 
 
46
  # Copy the rest of the application code to /app
47
  # This should be done AFTER all dependencies are installed
48
  COPY . /app/
 
49
 
50
  # Create necessary directories with appropriate permissions
51
  RUN mkdir -p /app/cache /app/uploads /app/results /app/checkpoints /app/temp \
52
  && chmod -R 777 /app/cache /app/uploads /app/results /app/checkpoints /app/temp
53
 
54
+ # Ensure all relevant directories have the correct permissions
 
55
  RUN chmod -R 777 /app
56
 
57
+ # Disable Numba's on-disk caching (often problematic in containers)
58
  ENV NUMBA_DISABLE_PER_FILE_CACHE=1
59
 
60
  # Expose the port the app runs on