veltrixcode commited on
Commit
a12437b
·
verified ·
1 Parent(s): 27594b2

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +1 -18
Dockerfile CHANGED
@@ -9,21 +9,4 @@ COPY app.py .
9
 
10
  EXPOSE 7860
11
 
12
- CMD ["sh", "-c", "\
13
- python3 - << 'EOF'\n\
14
- import urllib.request\n\
15
- import subprocess\n\
16
- import sys\n\
17
- \n\
18
- def get_country():\n\
19
- try:\n\
20
- return urllib.request.urlopen('https://ipinfo.io/country', timeout=5).read().decode().strip()\n\
21
- except Exception:\n\
22
- return 'UNKNOWN'\n\
23
- \n\
24
- country = get_country()\n\
25
- print(f'🌍 Server country: {country}')\n\
26
- \n\
27
- subprocess.run(['python3', 'app.py'])\n\
28
- EOF\
29
- "]
 
9
 
10
  EXPOSE 7860
11
 
12
+ CMD ["python3", "app.py"]