ggcristian commited on
Commit
1b03f64
·
1 Parent(s): b4a2d7e

Try switching to Docker to avoid config errors

Browse files
Files changed (3) hide show
  1. Dockerfile +14 -0
  2. README.md +2 -2
  3. nginx.conf +25 -0
Dockerfile ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM nginx:alpine
2
+
3
+ RUN adduser -D -u 1000 user
4
+
5
+ COPY --chown=user dist /usr/share/nginx/html
6
+ COPY --chown=user nginx.conf /etc/nginx/conf.d/default.conf
7
+
8
+ RUN chown -R user:user /usr/share/nginx/html /var/cache/nginx /var/run /var/log/nginx
9
+
10
+ USER user
11
+
12
+ EXPOSE 7860
13
+
14
+ CMD ["nginx", "-g", "daemon off;"]
README.md CHANGED
@@ -3,8 +3,8 @@ title: TuRTLe Leaderboard
3
  emoji: 🐢
4
  colorFrom: gray
5
  colorTo: green
6
- sdk: static
7
- app_file: dist/index.html
8
  pinned: true
9
  license: apache-2.0
10
  short_description: A Unified Evaluation of LLMs for RTL Generation.
 
3
  emoji: 🐢
4
  colorFrom: gray
5
  colorTo: green
6
+ sdk: docker
7
+ app_port: 7860
8
  pinned: true
9
  license: apache-2.0
10
  short_description: A Unified Evaluation of LLMs for RTL Generation.
nginx.conf ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ server {
2
+ listen 7860;
3
+ server_name localhost;
4
+
5
+ root /usr/share/nginx/html;
6
+ index index.html;
7
+
8
+ gzip on;
9
+ gzip_vary on;
10
+ gzip_min_length 1024;
11
+ gzip_types text/plain text/css text/xml text/javascript application/javascript application/xml+rss application/json;
12
+
13
+ location ~* \.(js|css|png|jpg|jpeg|gif|svg|ico|woff|woff2|ttf|eot)$ {
14
+ expires 1y;
15
+ add_header Cache-Control "public, immutable";
16
+ }
17
+
18
+ location / {
19
+ try_files $uri $uri/ /index.html;
20
+ }
21
+
22
+ add_header X-Frame-Options "SAMEORIGIN" always;
23
+ add_header X-Content-Type-Options "nosniff" always;
24
+ add_header X-XSS-Protection "1; mode=block" always;
25
+ }