GDMProjects commited on
Commit
d6c18a0
·
verified ·
1 Parent(s): 3425736

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -7
Dockerfile CHANGED
@@ -1,7 +1,7 @@
1
  # Base
2
  FROM python:3.10-slim
3
 
4
- # System deps for LightGBM (OpenMP)
5
  RUN apt-get update \
6
  && apt-get install -y --no-install-recommends libgomp1 \
7
  && rm -rf /var/lib/apt/lists/*
@@ -9,13 +9,11 @@ RUN apt-get update \
9
  # App workdir
10
  WORKDIR /app
11
 
12
- # ---- HF hub persistent writable cache (Fix B) ----
13
- # Use /data (persistent on Spaces) so models aren't re-downloaded every restart
14
  ENV HOME=/app \
15
  HF_HOME=/data/.hf \
16
  HUGGINGFACE_HUB_CACHE=/data/.hf/cache \
17
  TRANSFORMERS_CACHE=/data/.cache/huggingface
18
- # Pre-create and open permissions for the runtime (non-root) user
19
  RUN mkdir -p /data/.hf/cache /data/.cache/huggingface \
20
  && chmod -R a+rw /data
21
  # --------------------------------------------------
@@ -28,11 +26,10 @@ COPY GTT.csv .
28
  # Install Python deps
29
  RUN pip install --no-cache-dir -r requirements.txt
30
 
31
- # Make /app writable for the runtime user to avoid PyCaret logging warnings
32
- # (Hugging Face Spaces often runs as a non-root user)
33
  RUN chmod -R a+rw /app
34
 
35
- # Optional: pre-create a writable log file to silence the warning completely
36
  RUN touch /app/logs.log && chmod 666 /app/logs.log
37
 
38
  # Gradio / Matplotlib envs
 
1
  # Base
2
  FROM python:3.10-slim
3
 
4
+
5
  RUN apt-get update \
6
  && apt-get install -y --no-install-recommends libgomp1 \
7
  && rm -rf /var/lib/apt/lists/*
 
9
  # App workdir
10
  WORKDIR /app
11
 
 
 
12
  ENV HOME=/app \
13
  HF_HOME=/data/.hf \
14
  HUGGINGFACE_HUB_CACHE=/data/.hf/cache \
15
  TRANSFORMERS_CACHE=/data/.cache/huggingface
16
+
17
  RUN mkdir -p /data/.hf/cache /data/.cache/huggingface \
18
  && chmod -R a+rw /data
19
  # --------------------------------------------------
 
26
  # Install Python deps
27
  RUN pip install --no-cache-dir -r requirements.txt
28
 
29
+
 
30
  RUN chmod -R a+rw /app
31
 
32
+
33
  RUN touch /app/logs.log && chmod 666 /app/logs.log
34
 
35
  # Gradio / Matplotlib envs