Spaces:
Running
Running
update docker file
Browse files
app.py
CHANGED
|
@@ -1373,7 +1373,7 @@ with gr.Blocks(
|
|
| 1373 |
req_path = os.path.join(temp_dir, "requirements.txt")
|
| 1374 |
with open(req_path, "w") as f:
|
| 1375 |
f.write(reqs)
|
| 1376 |
-
# 2. Write Dockerfile
|
| 1377 |
dockerfile_content = '''FROM python:3.9-slim
|
| 1378 |
|
| 1379 |
WORKDIR /app
|
|
@@ -1397,7 +1397,7 @@ HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
|
|
| 1397 |
ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]
|
| 1398 |
'''
|
| 1399 |
dockerfile_path = os.path.join(temp_dir, "Dockerfile")
|
| 1400 |
-
with open(dockerfile_path, "w") as f:
|
| 1401 |
f.write(dockerfile_content)
|
| 1402 |
# 3. Write src/streamlit_app.py
|
| 1403 |
src_dir = os.path.join(temp_dir, "src")
|
|
|
|
| 1373 |
req_path = os.path.join(temp_dir, "requirements.txt")
|
| 1374 |
with open(req_path, "w") as f:
|
| 1375 |
f.write(reqs)
|
| 1376 |
+
# 2. Write Dockerfile (EXACT content as screenshot, no escaping)
|
| 1377 |
dockerfile_content = '''FROM python:3.9-slim
|
| 1378 |
|
| 1379 |
WORKDIR /app
|
|
|
|
| 1397 |
ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]
|
| 1398 |
'''
|
| 1399 |
dockerfile_path = os.path.join(temp_dir, "Dockerfile")
|
| 1400 |
+
with open(dockerfile_path, "w", newline="\n") as f:
|
| 1401 |
f.write(dockerfile_content)
|
| 1402 |
# 3. Write src/streamlit_app.py
|
| 1403 |
src_dir = os.path.join(temp_dir, "src")
|