chelleboyer commited on
Commit
d94d1c0
·
1 Parent(s): 5ebebc8

Update port configuration to 7860 for Hugging Face Spaces

Browse files
Files changed (2) hide show
  1. Dockerfile +3 -3
  2. Spacefile +4 -2
Dockerfile CHANGED
@@ -29,7 +29,7 @@ RUN mkdir -p data/planogram001 && \
29
  chmod -R 777 .chainlit
30
 
31
  # Expose the port Chainlit runs on
32
- EXPOSE 8000
33
 
34
  # Set environment variables
35
  ENV PYTHONPATH=/app
@@ -37,7 +37,7 @@ ENV HF_HUB_ENABLE_HF_TRANSFER=1
37
  ENV TRANSFORMERS_CACHE=/.cache
38
  ENV HF_HOME=/.cache
39
  ENV CHAINLIT_SERVER_HOST=0.0.0.0
40
- ENV CHAINLIT_SERVER_PORT=8000
41
  ENV CHAINLIT_DEBUG=1
42
 
43
  # Create a startup script with debugging
@@ -49,7 +49,7 @@ ls -la\n\
49
  echo "Chainlit config:"\n\
50
  cat .chainlit/config.toml\n\
51
  echo "Starting server..."\n\
52
- chainlit run app.py --host 0.0.0.0 --port 8000 --debug\n\
53
  ' > /app/start.sh && chmod +x /app/start.sh
54
 
55
  # Run the application
 
29
  chmod -R 777 .chainlit
30
 
31
  # Expose the port Chainlit runs on
32
+ EXPOSE 7860
33
 
34
  # Set environment variables
35
  ENV PYTHONPATH=/app
 
37
  ENV TRANSFORMERS_CACHE=/.cache
38
  ENV HF_HOME=/.cache
39
  ENV CHAINLIT_SERVER_HOST=0.0.0.0
40
+ ENV CHAINLIT_SERVER_PORT=7860
41
  ENV CHAINLIT_DEBUG=1
42
 
43
  # Create a startup script with debugging
 
49
  echo "Chainlit config:"\n\
50
  cat .chainlit/config.toml\n\
51
  echo "Starting server..."\n\
52
+ chainlit run app.py --host 0.0.0.0 --port 7860 --debug\n\
53
  ' > /app/start.sh && chmod +x /app/start.sh
54
 
55
  # Run the application
Spacefile CHANGED
@@ -6,13 +6,15 @@ python_version: "3.11"
6
  # Set up the environment
7
  run: |
8
  pip install -r requirements.txt
9
- chainlit run app.py
10
 
11
  # Set environment variables
12
  env:
13
  PYTHONPATH: ${PYTHONPATH}:${SPACE_ID}
14
  HF_HUB_ENABLE_HF_TRANSFER: 1
 
 
15
 
16
  # Expose the port
17
  ports:
18
- - 8000
 
6
  # Set up the environment
7
  run: |
8
  pip install -r requirements.txt
9
+ chainlit run app.py --host 0.0.0.0 --port 7860
10
 
11
  # Set environment variables
12
  env:
13
  PYTHONPATH: ${PYTHONPATH}:${SPACE_ID}
14
  HF_HUB_ENABLE_HF_TRANSFER: 1
15
+ CHAINLIT_SERVER_HOST: 0.0.0.0
16
+ CHAINLIT_SERVER_PORT: 7860
17
 
18
  # Expose the port
19
  ports:
20
+ - 7860