e243615 commited on
Commit
2076ba5
·
verified ·
1 Parent(s): 86d4ac3

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -8
Dockerfile CHANGED
@@ -28,22 +28,27 @@ COPY . /app
28
  # Python deps (from requirements.txt)
29
  RUN pip install --no-cache-dir -r requirements.txt
30
 
31
- # Notebook execution deps (nbclient needed under the hood too)
32
- RUN pip install --no-cache-dir notebook nbclient nbformat jupyter_client ipykernel papermill
33
-
34
- # Pre-install packages notebooks might pip install
 
 
 
 
 
 
35
  RUN pip install --no-cache-dir textblob faker transformers
36
 
37
- # ✅ Register Python kernel INSIDE the environment Jupyter uses (NOT --user)
38
  RUN python -m ipykernel install --sys-prefix --name python3 --display-name "Python 3"
39
 
40
- # ✅ Install and register IRkernel with an explicit name "ir"
41
  RUN R -e "install.packages('IRkernel', repos='https://cloud.r-project.org/')"
42
  RUN R -e "IRkernel::installspec(name='ir', displayname='R (IRkernel)', user=FALSE)"
43
 
44
- # Optional but VERY useful: print kernels available during build
45
  RUN jupyter kernelspec list
46
 
47
  EXPOSE 7860
48
-
49
  CMD ["python", "app.py"]
 
28
  # Python deps (from requirements.txt)
29
  RUN pip install --no-cache-dir -r requirements.txt
30
 
31
+ # Notebook execution deps (papermill + jupyter stack)
32
+ RUN pip install --no-cache-dir \
33
+ notebook \
34
+ papermill \
35
+ ipykernel \
36
+ nbclient \
37
+ nbformat \
38
+ jupyter_client
39
+
40
+ # Pre-install packages notebooks might install at runtime
41
  RUN pip install --no-cache-dir textblob faker transformers
42
 
43
+ # ✅ Register Python kernel in the environment Jupyter uses
44
  RUN python -m ipykernel install --sys-prefix --name python3 --display-name "Python 3"
45
 
46
+ # ✅ R deps for notebook execution via papermill (IRkernel) with explicit name "ir"
47
  RUN R -e "install.packages('IRkernel', repos='https://cloud.r-project.org/')"
48
  RUN R -e "IRkernel::installspec(name='ir', displayname='R (IRkernel)', user=FALSE)"
49
 
50
+ # (Optional but useful) show installed kernels during build
51
  RUN jupyter kernelspec list
52
 
53
  EXPOSE 7860
 
54
  CMD ["python", "app.py"]