NickPatel17 commited on
Commit
cc1279f
·
verified ·
1 Parent(s): b3f9b1a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -2
Dockerfile CHANGED
@@ -1,9 +1,15 @@
1
  # Use an official Python runtime
2
  FROM python:3.11-slim
3
 
4
- # 1. FORCE PYTHON TO PRINT LOGS IMMEDIATELY (Crucial for debugging!)
5
  ENV PYTHONUNBUFFERED=1
6
 
 
 
 
 
 
 
7
  # Set the working directory
8
  WORKDIR /app
9
 
@@ -14,7 +20,7 @@ RUN pip install --no-cache-dir -r requirements.txt
14
  # Copy all your backend files into the container
15
  COPY . .
16
 
17
- # 2. GRANT FILE PERMISSIONS TO HUGGING FACE (Prevents silent read errors for .pkl files)
18
  RUN chown -R 1000:1000 /app
19
  USER 1000
20
 
 
1
  # Use an official Python runtime
2
  FROM python:3.11-slim
3
 
4
+ # Force Python to print logs immediately
5
  ENV PYTHONUNBUFFERED=1
6
 
7
+ # 1. FIX MATPLOTLIB WARNING: Give it a writable temp folder
8
+ ENV MPLCONFIGDIR=/tmp/matplotlib
9
+
10
+ # 2. FIX LIGHTGBM ERROR: Install the missing Linux C++ library
11
+ RUN apt-get update && apt-get install -y libgomp1 && rm -rf /var/lib/apt/lists/*
12
+
13
  # Set the working directory
14
  WORKDIR /app
15
 
 
20
  # Copy all your backend files into the container
21
  COPY . .
22
 
23
+ # Grant file permissions to Hugging Face user
24
  RUN chown -R 1000:1000 /app
25
  USER 1000
26