Magdixpz commited on
Commit
e4ea7bd
1 Parent(s): 21d9c72

Upload 3 files

Browse files
Files changed (3) hide show
  1. Dockerfile +48 -0
  2. gitattributes +34 -0
  3. login.html +67 -0
Dockerfile ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # https://gitlab.com/nvidia/container-images/cuda/-/blob/master/dist/11.7.1/ubuntu2204/devel/cudnn8/Dockerfile
2
+ FROM nvidia/cuda:11.7.1-cudnn8-devel-ubuntu22.04
3
+ ENV DEBIAN_FRONTEND noninteractive
4
+
5
+ WORKDIR /content
6
+
7
+ RUN apt-get update -y && apt-get upgrade -y && apt-get install -y sudo && apt-get install -y python3-pip && pip3 install --upgrade pip
8
+ RUN apt-get install -y curl gnupg wget htop sudo git git-lfs software-properties-common build-essential libgl1 zip unzip
9
+
10
+ RUN add-apt-repository ppa:flexiondotorg/nvtop
11
+ RUN apt-get upgrade -y
12
+ RUN apt-get install -y nvtop
13
+
14
+ RUN curl -sL https://deb.nodesource.com/setup_14.x | bash -
15
+ RUN apt-get install -y nodejs
16
+ RUN npm install
17
+ RUN npm install -g configurable-http-proxy
18
+
19
+ ENV PATH="/home/admin/.local/bin:${PATH}"
20
+
21
+ RUN pip3 install jupyterhub && \
22
+ pip3 install --upgrade notebook && \
23
+ pip3 install oauthenticator && \
24
+ pip3 install pandas scipy matplotlib && \
25
+ pip3 install --upgrade jupyterlab jupyterlab-git && \
26
+ pip3 install ipywidgets && \
27
+ pip3 install torch torchvision torchaudio && \
28
+ jupyter lab build
29
+
30
+ RUN jupyter nbextension enable --py widgetsnbextension
31
+
32
+ RUN git clone https://github.com/camenduru/jupyter
33
+ COPY login.html /usr/local/lib/python3.10/dist-packages/jupyter_server/templates/login.html
34
+
35
+ RUN adduser --disabled-password --gecos '' admin
36
+ RUN adduser admin sudo
37
+ RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
38
+
39
+ RUN chown -R admin:admin /content
40
+ RUN chmod -R 777 /content
41
+ RUN chown -R admin:admin /home
42
+ RUN chmod -R 777 /home
43
+
44
+ USER admin
45
+
46
+ EXPOSE 7860
47
+
48
+ CMD jupyter-lab --ip 0.0.0.0 --port 7860 --no-browser --allow-root --NotebookApp.token='huggingface' --NotebookApp.tornado_settings="{'headers': {'Content-Security-Policy': 'frame-ancestors *'}}" --NotebookApp.cookie_options="{'SameSite': 'None', 'Secure': True}" --NotebookApp.disable_check_xsrf=True
gitattributes ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tflite filter=lfs diff=lfs merge=lfs -text
29
+ *.tgz filter=lfs diff=lfs merge=lfs -text
30
+ *.wasm filter=lfs diff=lfs merge=lfs -text
31
+ *.xz filter=lfs diff=lfs merge=lfs -text
32
+ *.zip filter=lfs diff=lfs merge=lfs -text
33
+ *.zst filter=lfs diff=lfs merge=lfs -text
34
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
login.html ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {% extends "page.html" %}
2
+
3
+
4
+ {% block stylesheet %}
5
+ {% endblock %}
6
+
7
+ {% block site %}
8
+
9
+ <div id="jupyter-main-app" class="container">
10
+
11
+ <img src="https://huggingface.co/front/assets/huggingface_logo-noborder.svg" alt="Huggig Face Logo">
12
+ <h4>You can duplicate this Space to run it private.</h4>
13
+ <br>
14
+ <a class="duplicate-button" style="display:inline-block" target="_blank" href="https://huggingface.co/spaces/camenduru/jupyter?duplicate=true">
15
+ <img style="margin: 0" src="https://img.shields.io/badge/-Duplicate%20Space-blue?labelColor=white&amp;style=flat&amp;logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAP5JREFUOE+lk7FqAkEURY+ltunEgFXS2sZGIbXfEPdLlnxJyDdYB62sbbUKpLbVNhyYFzbrrA74YJlh9r079973psed0cvUD4A+4HoCjsA85X0Dfn/RBLBgBDxnQPfAEJgBY+A9gALA4tcbamSzS4xq4FOQAJgCDwV2CPKV8tZAJcAjMMkUe1vX+U+SMhfAJEHasQIWmXNN3abzDwHUrgcRGmYcgKe0bxrblHEB4E/pndMazNpSZGcsZdBlYJcEL9Afo75molJyM2FxmPgmgPqlWNLGfwZGG6UiyEvLzHYDmoPkDDiNm9JR9uboiONcBXrpY1qmgs21x1QwyZcpvxt9NS09PlsPAAAAAElFTkSuQmCC&amp;logoWidth=14" alt="Duplicate Space"></a>
16
+ <br>
17
+ <br>
18
+ <h4>Token is <span style="color:orange;">huggingface</span></h4>
19
+
20
+ {% if login_available %}
21
+ {# login_available means password-login is allowed. Show the form. #}
22
+ <div class="row">
23
+ <div class="navbar col-sm-8">
24
+ <div class="navbar-inner">
25
+ <div class="container">
26
+ <div class="center-nav">
27
+ <form action="{{base_url}}login?next={{next}}" method="post" class="navbar-form pull-left">
28
+ {{ xsrf_form_html() | safe }}
29
+ {% if token_available %}
30
+ <label for="password_input"><strong>{% trans %}Token:{% endtrans
31
+ %}</strong></label>
32
+ {% else %}
33
+ <label for="password_input"><strong>{% trans %}Password:{% endtrans %}</strong></label>
34
+ {% endif %}
35
+ <input type="password" name="password" id="password_input" class="form-control">
36
+ <button type="submit" class="btn btn-default" id="login_submit">{% trans %}Log in{% endtrans
37
+ %}</button>
38
+ </form>
39
+ </div>
40
+ </div>
41
+ </div>
42
+ </div>
43
+ </div>
44
+ {% else %}
45
+ <p>{% trans %}No login available, you shouldn't be seeing this page.{% endtrans %}</p>
46
+ {% endif %}
47
+ {% if message %}
48
+ <div class="row">
49
+ {% for key in message %}
50
+ <div class="message {{key}}">
51
+ {{message[key]}}
52
+ </div>
53
+ {% endfor %}
54
+ </div>
55
+ {% endif %}
56
+ {% if token_available %}
57
+ {% block token_message %}
58
+
59
+ {% endblock token_message %}
60
+ {% endif %}
61
+ </div>
62
+
63
+ {% endblock %}
64
+
65
+
66
+ {% block script %}
67
+ {% endblock %}