ulysses115 sanchit-gandhi HF staff commited on
Commit
514728b
0 Parent(s):

Duplicate from sanchit-gandhi/whisper-jax

Browse files

Co-authored-by: Sanchit Gandhi <[email protected]>

Files changed (5) hide show
  1. .gitattributes +35 -0
  2. Dockerfile +30 -0
  3. README.md +11 -0
  4. nginx.conf +23 -0
  5. run.sh +6 -0
.gitattributes ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
35
+ audio.wav filter=lfs diff=lfs merge=lfs -text
Dockerfile ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM ubuntu
2
+
3
+ # Based on https://huggingface.co/spaces/radames/nginx-gradio-reverse-proxy/blob/main/Dockerfile
4
+ USER root
5
+
6
+ RUN apt-get -y update && apt-get -y install nginx
7
+ RUN mkdir -p /var/cache/nginx \
8
+ /var/log/nginx \
9
+ /var/lib/nginx
10
+ RUN touch /var/run/nginx.pid
11
+
12
+ RUN chown -R 1000:1000 /var/cache/nginx \
13
+ /var/log/nginx \
14
+ /var/lib/nginx \
15
+ /var/run/nginx.pid
16
+
17
+ RUN useradd -m -u 1000 user
18
+
19
+ USER user
20
+ ENV HOME=/home/user
21
+
22
+ RUN mkdir $HOME/app
23
+ WORKDIR $HOME/app
24
+
25
+ # Copy nginx configuration
26
+ COPY --chown=user nginx.conf /etc/nginx/sites-available/default
27
+ COPY --chown=user . .
28
+
29
+ CMD ["bash", "run.sh"]
30
+
README.md ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: Whisper JAX
3
+ emoji: ⚡️
4
+ colorFrom: yellow
5
+ colorTo: indigo
6
+ sdk: docker
7
+ pinned: false
8
+ duplicated_from: sanchit-gandhi/whisper-jax
9
+ ---
10
+
11
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
nginx.conf ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ server {
2
+ listen 7860 default_server;
3
+ listen [::]:7860 default_server;
4
+
5
+ root /usr/share/nginx/html;
6
+ index index.html index.htm;
7
+
8
+ server_name _;
9
+ location / {
10
+ proxy_pass http://API_URL;
11
+ proxy_set_header Host API_URL;
12
+ proxy_set_header X-Real-IP $remote_addr;
13
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
14
+ #proxy_set_header X-Forwarded-Proto $scheme;
15
+ proxy_set_header X-Forwarded-Proto http;
16
+ proxy_set_header X-Forwarded-Ssl off;
17
+ proxy_set_header X-Url-Scheme http;
18
+ proxy_buffering off;
19
+ proxy_http_version 1.1;
20
+ proxy_set_header Upgrade $http_upgrade;
21
+ proxy_set_header Connection "upgrade";
22
+ }
23
+ }
run.sh ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ # Careful: can't create tmp files from this script
4
+ cat nginx.conf | sed "s|API_URL|${API_URL}|g" > /etc/nginx/sites-available/default
5
+ service nginx start
6
+ sleep infinity