Anirudh Esthuri commited on
Commit
f8da35d
·
1 Parent(s): e09b564

Match working Playground setup: Python 3.10 and simpler CMD

Browse files
Files changed (2) hide show
  1. .streamlit/config.toml +1 -1
  2. Dockerfile +3 -3
.streamlit/config.toml CHANGED
@@ -1,4 +1,4 @@
1
  [server]
2
  headless = true
3
- enableCORS = true
4
  enableXsrfProtection = false
 
1
  [server]
2
  headless = true
3
+ enableCORS = false
4
  enableXsrfProtection = false
Dockerfile CHANGED
@@ -1,4 +1,4 @@
1
- FROM python:3.12-slim
2
 
3
  # Set working directory
4
  WORKDIR /app
@@ -48,6 +48,6 @@ HEALTHCHECK --interval=30s --timeout=10s --start-period=40s --retries=3 \
48
  CMD curl --fail http://localhost:${PORT:-7860}/_stcore/health || exit 1
49
 
50
  # Run Streamlit app using PORT env var from Hugging Face Spaces
51
- # HuggingFace sets $PORT, don't override it. Default to 7860 if not set.
52
  # Temporarily using app_test.py for debugging
53
- CMD ["bash", "-c", "echo 'Starting Streamlit with PORT='${PORT:-7860} && streamlit run app_test.py --server.address=0.0.0.0 --server.port=${PORT:-7860} --server.headless=true --server.enableCORS=true --server.enableXsrfProtection=false"]
 
1
+ FROM python:3.10-slim
2
 
3
  # Set working directory
4
  WORKDIR /app
 
48
  CMD curl --fail http://localhost:${PORT:-7860}/_stcore/health || exit 1
49
 
50
  # Run Streamlit app using PORT env var from Hugging Face Spaces
51
+ # HuggingFace sets $PORT, don't override it.
52
  # Temporarily using app_test.py for debugging
53
+ CMD ["bash", "-c", "echo Using PORT=$PORT && streamlit run app_test.py --server.address=0.0.0.0 --server.port=$PORT"]