Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +12 -33
Dockerfile
CHANGED
@@ -1,38 +1,17 @@
|
|
1 |
-
FROM python
|
2 |
|
3 |
-
|
|
|
4 |
|
5 |
-
#
|
6 |
-
|
7 |
-
jupyter \
|
8 |
-
notebook \
|
9 |
-
ipywidgets \
|
10 |
-
numpy \
|
11 |
-
pandas \
|
12 |
-
matplotlib \
|
13 |
-
seaborn \
|
14 |
-
scikit-learn \
|
15 |
-
transformers \
|
16 |
-
torch \
|
17 |
-
gradio
|
18 |
|
19 |
-
#
|
20 |
-
|
21 |
-
RUN mkdir -p /app/notebooks && chown -R jupyter:jupyter /app
|
22 |
|
23 |
-
# Copy
|
24 |
-
COPY
|
25 |
-
COPY --chown=jupyter:jupyter app.py /app/
|
26 |
-
COPY --chown=jupyter:jupyter run.sh /app/
|
27 |
|
28 |
-
#
|
29 |
-
|
30 |
-
|
31 |
-
# Switch to non-root user
|
32 |
-
USER jupyter
|
33 |
-
|
34 |
-
# Expose port
|
35 |
-
EXPOSE 7860
|
36 |
-
|
37 |
-
# Start servers
|
38 |
-
CMD ["/app/run.sh"]
|
|
|
1 |
+
FROM jupyter/base-notebook:python-3.9
|
2 |
|
3 |
+
# Install additional Python packages
|
4 |
+
RUN pip install numpy pandas matplotlib seaborn scikit-learn transformers torch
|
5 |
|
6 |
+
# Make port 8888 available for Jupyter
|
7 |
+
EXPOSE 8888
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
|
9 |
+
# Set the working directory
|
10 |
+
WORKDIR /home/jovyan/work
|
|
|
11 |
|
12 |
+
# Copy our sample notebook
|
13 |
+
COPY welcome.ipynb /home/jovyan/work/
|
|
|
|
|
14 |
|
15 |
+
# Set our entrypoint to start Jupyter without requiring a token
|
16 |
+
# and using the base URL required by Hugging Face Spaces
|
17 |
+
ENTRYPOINT ["jupyter", "notebook", "--ip=0.0.0.0", "--port=8888", "--no-browser", "--NotebookApp.token=''", "--NotebookApp.password=''", "--NotebookApp.allow_origin='*'", "--NotebookApp.base_url='/proxy/8888/'"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|