ElizabethSrgh commited on
Commit
4236c25
·
verified ·
1 Parent(s): fd3c883

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -5
Dockerfile CHANGED
@@ -1,20 +1,25 @@
1
  FROM python:3.10-slim
2
 
3
- # Install basic tools
4
  RUN apt-get update && apt-get install -y git && apt-get clean
5
 
6
  # Install Python packages
7
  RUN pip install --upgrade pip
8
  RUN pip install jupyterlab transformers datasets scikit-learn torch pandas numpy matplotlib seaborn
9
 
10
- # Set working directory
11
  WORKDIR /workspace
12
 
13
- # Set HOME environment to avoid PermissionError
14
  ENV HOME=/workspace
 
 
15
 
16
- # Copy files to container
 
 
 
17
  COPY . /workspace
18
 
19
- # Start JupyterLab
20
  CMD ["jupyter", "lab", "--ip=0.0.0.0", "--allow-root", "--NotebookApp.token=''", "--NotebookApp.password=''", "--no-browser", "--NotebookApp.allow_origin='*'"]
 
1
  FROM python:3.10-slim
2
 
3
+ # Install system tools
4
  RUN apt-get update && apt-get install -y git && apt-get clean
5
 
6
  # Install Python packages
7
  RUN pip install --upgrade pip
8
  RUN pip install jupyterlab transformers datasets scikit-learn torch pandas numpy matplotlib seaborn
9
 
10
+ # Working directory
11
  WORKDIR /workspace
12
 
13
+ # Set environment to fix PermissionError
14
  ENV HOME=/workspace
15
+ ENV JUPYTER_RUNTIME_DIR=/workspace/jupyter/runtime
16
+ ENV JUPYTER_DATA_DIR=/workspace/jupyter/data
17
 
18
+ # Create directories explicitly
19
+ RUN mkdir -p /workspace/jupyter/runtime && mkdir -p /workspace/jupyter/data
20
+
21
+ # Copy all contents
22
  COPY . /workspace
23
 
24
+ # Launch JupyterLab
25
  CMD ["jupyter", "lab", "--ip=0.0.0.0", "--allow-root", "--NotebookApp.token=''", "--NotebookApp.password=''", "--no-browser", "--NotebookApp.allow_origin='*'"]