Update Dockerfile
Browse files- Dockerfile +10 -5
Dockerfile
CHANGED
@@ -1,20 +1,25 @@
|
|
1 |
FROM python:3.10-slim
|
2 |
|
3 |
-
# Install
|
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 |
-
#
|
11 |
WORKDIR /workspace
|
12 |
|
13 |
-
# Set
|
14 |
ENV HOME=/workspace
|
|
|
|
|
15 |
|
16 |
-
#
|
|
|
|
|
|
|
17 |
COPY . /workspace
|
18 |
|
19 |
-
#
|
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='*'"]
|