Spaces:
Paused
Paused
updated dockerfile
Browse files- Dockerfile +36 -0
Dockerfile
CHANGED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Start from the official Jupyter docker-stacks image for PySpark
|
| 2 |
+
FROM jupyter/pyspark-notebook:latest
|
| 3 |
+
|
| 4 |
+
# Switch to root to install OS-level packages if needed
|
| 5 |
+
USER root
|
| 6 |
+
|
| 7 |
+
# (Optional) Install extra system dependencies here, e.g.:
|
| 8 |
+
# RUN apt-get update && apt-get install -y vim && rm -rf /var/lib/apt/lists/*
|
| 9 |
+
|
| 10 |
+
# Switch back to the 'jovyan' user (the default user in jupyter docker-stacks)
|
| 11 |
+
USER $NB_UID
|
| 12 |
+
|
| 13 |
+
# Create a working directory (already set to /home/jovyan by default).
|
| 14 |
+
# We'll explicitly set it here for clarity.
|
| 15 |
+
WORKDIR /home/jovyan/work
|
| 16 |
+
|
| 17 |
+
# Copy any additional Python packages you need
|
| 18 |
+
COPY requirements.txt /tmp/requirements.txt
|
| 19 |
+
RUN pip install --no-cache-dir --upgrade pip && \
|
| 20 |
+
pip install --no-cache-dir -r /tmp/requirements.txt || true
|
| 21 |
+
|
| 22 |
+
# Copy notebooks and data into the container
|
| 23 |
+
COPY notebooks/ notebooks/
|
| 24 |
+
COPY data/ data/
|
| 25 |
+
|
| 26 |
+
# Expose Jupyter's default port
|
| 27 |
+
EXPOSE 8888
|
| 28 |
+
|
| 29 |
+
# Run Jupyter Notebook, disabling token & password
|
| 30 |
+
CMD ["start.sh", "jupyter", "notebook", \
|
| 31 |
+
"--ip=0.0.0.0", \
|
| 32 |
+
"--port=8888", \
|
| 33 |
+
"--no-browser", \
|
| 34 |
+
"--NotebookApp.token=''", \
|
| 35 |
+
"--NotebookApp.password=''"]
|
| 36 |
+
|