carpelan commited on
Commit
42175c1
·
1 Parent(s): 0bfc111

changed some minor settings enable_monitoring=True and server port

Browse files
Files changed (3) hide show
  1. .docker/dockerfile +3 -3
  2. Makefile +3 -0
  3. app/main.py +3 -2
.docker/dockerfile CHANGED
@@ -8,13 +8,14 @@ ENV PYTHONUNBUFFERED=1 \
8
  GRADIO_NUM_PORTS=1 \
9
  GRADIO_SERVER_NAME=0.0.0.0 \
10
  GRADIO_THEME=huggingface \
 
 
11
  SYSTEM=spaces \
12
  AM_I_IN_A_DOCKER_CONTAINER=Yes \
13
  PYTHONPATH=/home/appuser/app \
14
  HF_HOME=/home/appuser/.cache \
15
  TORCH_HOME=/home/appuser/.cache \
16
  TMP_DIR=/home/appuser/tmp \
17
- TRANSFORMERS_CACHE=/home/appuser/.cache/transformers \
18
  NVIDIA_VISIBLE_DEVICES=all \
19
  NVIDIA_DRIVER_CAPABILITIES=compute,utility
20
 
@@ -48,7 +49,6 @@ RUN uv sync --frozen --no-cache \
48
  && chown -R appuser:appuser /home/appuser/app/.venv \
49
  && rm -rf /root/.cache /home/appuser/.cache
50
 
51
-
52
  # Copy application code
53
  COPY --chown=appuser app app
54
 
@@ -60,7 +60,7 @@ RUN mkdir -p /home/appuser/.cache/transformers /home/appuser/tmp /home/appuser/.
60
  USER appuser
61
 
62
  # Expose port for Gradio
63
- EXPOSE 7862
64
 
65
  # Command to run the application
66
  CMD ["uv", "run", "python", "app/main.py"]
 
8
  GRADIO_NUM_PORTS=1 \
9
  GRADIO_SERVER_NAME=0.0.0.0 \
10
  GRADIO_THEME=huggingface \
11
+ GRADIO_SERVER_PORT=7860 \
12
+ GRADIO_SSR_MODE="True" \
13
  SYSTEM=spaces \
14
  AM_I_IN_A_DOCKER_CONTAINER=Yes \
15
  PYTHONPATH=/home/appuser/app \
16
  HF_HOME=/home/appuser/.cache \
17
  TORCH_HOME=/home/appuser/.cache \
18
  TMP_DIR=/home/appuser/tmp \
 
19
  NVIDIA_VISIBLE_DEVICES=all \
20
  NVIDIA_DRIVER_CAPABILITIES=compute,utility
21
 
 
49
  && chown -R appuser:appuser /home/appuser/app/.venv \
50
  && rm -rf /root/.cache /home/appuser/.cache
51
 
 
52
  # Copy application code
53
  COPY --chown=appuser app app
54
 
 
60
  USER appuser
61
 
62
  # Expose port for Gradio
63
+ EXPOSE 7860
64
 
65
  # Command to run the application
66
  CMD ["uv", "run", "python", "app/main.py"]
Makefile CHANGED
@@ -35,6 +35,9 @@ build:
35
  pip install -e .
36
  gradio app.py
37
 
 
 
 
38
  # clean_for_actions:
39
  # git lfs prune
40
  # git filter-branch --force --index-filter "git rm --cached --ignore-unmatch helper/text/videos/eating_spaghetti.mp4" --prune-empty --tag-name-filter cat -- --all
 
35
  pip install -e .
36
  gradio app.py
37
 
38
+ docker_build:
39
+ docker build -t htrflow-app -f .docker/Dockerfile .
40
+
41
  # clean_for_actions:
42
  # git lfs prune
43
  # git filter-branch --force --index-filter "git rm --cached --ignore-unmatch helper/text/videos/eating_spaghetti.mp4" --prune-empty --tag-name-filter cat -- --all
app/main.py CHANGED
@@ -103,7 +103,8 @@ demo.queue()
103
  if __name__ == "__main__":
104
  demo.launch(
105
  server_name="0.0.0.0",
106
- server_port=7864,
107
- enable_monitoring=False,
 
108
  # show_error=True,
109
  )
 
103
  if __name__ == "__main__":
104
  demo.launch(
105
  server_name="0.0.0.0",
106
+ server_port=7860,
107
+ enable_monitoring=True,
108
+ ssr_mode=True
109
  # show_error=True,
110
  )