jedick commited on
Commit
74ebbc8
·
1 Parent(s): a882b66

Change exposed port from 7860 to 8080

Browse files
Files changed (2) hide show
  1. Dockerfile +5 -5
  2. README.md +1 -0
Dockerfile CHANGED
@@ -18,7 +18,7 @@ COPY requirements.txt docker/entrypoint.sh .
18
  # Create and activate virtual environment for installing packages
19
  # Install required Python and R packages
20
  # Make startup script executable
21
- # Add user for HF Spaces Dev Mode and chown /app directory for user
22
  RUN apt-get update && \
23
  apt-get install -y python3 python3-pip python3-venv screen vim git && \
24
  apt-get clean && \
@@ -28,16 +28,16 @@ RUN apt-get update && \
28
  pip --no-cache-dir install -r requirements.txt && \
29
  R -q -e 'install.packages(c("ellmer", "mcptools", "readr", "ggplot2", "tidyverse"))' && \
30
  chmod +x entrypoint.sh && \
31
- chown -R 1000:1000 /app && \
32
- useradd -m -u 1000 user
33
 
34
  # Copy app files with user permissions
35
  # NOTE: because the repo has docker/entrypoint.sh, this does *not*
36
  # overwrite the entrypoint.sh that we made executable above
37
- COPY --chown=1000 . /app
38
 
39
  # Set the user for Dev Mode
40
- USER 1000
41
 
42
  # Set default command (executable file in WORKDIR)
43
  CMD [ "/app/entrypoint.sh" ]
 
18
  # Create and activate virtual environment for installing packages
19
  # Install required Python and R packages
20
  # Make startup script executable
21
+ # Add user with uid=1000 and chown /app directory for HF Spaces Dev Mode
22
  RUN apt-get update && \
23
  apt-get install -y python3 python3-pip python3-venv screen vim git && \
24
  apt-get clean && \
 
28
  pip --no-cache-dir install -r requirements.txt && \
29
  R -q -e 'install.packages(c("ellmer", "mcptools", "readr", "ggplot2", "tidyverse"))' && \
30
  chmod +x entrypoint.sh && \
31
+ useradd -m -u 1000 user && \
32
+ chown -R user /app
33
 
34
  # Copy app files with user permissions
35
  # NOTE: because the repo has docker/entrypoint.sh, this does *not*
36
  # overwrite the entrypoint.sh that we made executable above
37
+ COPY --chown=user . /app
38
 
39
  # Set the user for Dev Mode
40
+ USER user
41
 
42
  # Set default command (executable file in WORKDIR)
43
  CMD [ "/app/entrypoint.sh" ]
README.md CHANGED
@@ -7,6 +7,7 @@ sdk: docker
7
  pinned: false
8
  license: mit
9
  short_description: Data analysis and plotting with Google ADK, MCP, and R
 
10
  ---
11
 
12
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
7
  pinned: false
8
  license: mit
9
  short_description: Data analysis and plotting with Google ADK, MCP, and R
10
+ app_port: 8080
11
  ---
12
 
13
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference