Elysiadev11 commited on
Commit
0e58b9e
·
verified ·
1 Parent(s): dec7538

Update start-hf.sh

Browse files
Files changed (1) hide show
  1. start-hf.sh +8 -0
start-hf.sh CHANGED
@@ -4,6 +4,14 @@
4
  # Set BASE_URL otomatis dari environment SPACE_HOST HF
5
  # ============================================================
6
 
 
 
 
 
 
 
 
 
7
  # Jika SPACE_HOST tersedia (otomatis dari HF Spaces), set BASE_URL
8
  if [ -n "$SPACE_HOST" ]; then
9
  export BASE_URL="https://${SPACE_HOST}"
 
4
  # Set BASE_URL otomatis dari environment SPACE_HOST HF
5
  # ============================================================
6
 
7
+ # Fix DNS - override setiap container start (bukan di Dockerfile!)
8
+ echo "🌐 Setting custom DNS resolvers..."
9
+ echo "nameserver 1.1.1.1" > /etc/resolv.conf
10
+ echo "nameserver 8.8.8.8" >> /etc/resolv.conf
11
+ echo "nameserver 8.8.4.4" >> /etc/resolv.conf
12
+ echo "options timeout:2 attempts:3" >> /etc/resolv.conf
13
+ echo "✅ DNS set: 1.1.1.1 (Cloudflare), 8.8.8.8 8.8.4.4 (Google)"
14
+
15
  # Jika SPACE_HOST tersedia (otomatis dari HF Spaces), set BASE_URL
16
  if [ -n "$SPACE_HOST" ]; then
17
  export BASE_URL="https://${SPACE_HOST}"