derek-thomas HF staff commited on
Commit
8f70d13
1 Parent(s): a63a7e9

Owning /data

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -10
Dockerfile CHANGED
@@ -18,19 +18,18 @@ RUN curl -Lk 'https://code.visualstudio.com/sha/download?build=stable&os=cli-alp
18
  # Create a non-root user with UID 1000
19
  RUN useradd -m -u 1000 -s /bin/bash user
20
 
 
 
 
21
  # Switch to the non-root user
22
  USER user
23
 
24
  # Set working directory
25
  WORKDIR /home/user
26
 
27
-
28
  # Add local python bin directory to PATH
29
  ENV PATH="/home/user/.local/bin:${PATH}"
30
 
31
- # Copy any necessary files (if needed)
32
- # COPY --chown=user:user your-files /home/user/your-destination
33
-
34
  # AWS Sagemaker compatible image
35
  # Assuming this part remains the same from your original Dockerfile
36
  FROM base as sagemaker
@@ -63,12 +62,6 @@ ENV HOME=/home/user \
63
  GRADIO_THEME=huggingface \
64
  SYSTEM=spaces
65
 
66
- ## Add JupyterLab entrypoint
67
- #ENTRYPOINT ["jupyter", "lab", "--ip=0.0.0.0", "--NotebookApp.token=''", "--port", "7860", "--no-browser"]
68
-
69
- # Optional: Set CMD to launch TGI or any other command
70
- #CMD ["text-generation-launcher", "--json-output"]
71
-
72
  # Copy the current directory contents into the container at $HOME/app setting the owner to the user
73
  COPY --chown=user . $HOME/
74
 
 
18
  # Create a non-root user with UID 1000
19
  RUN useradd -m -u 1000 -s /bin/bash user
20
 
21
+ # Change ownership of the /data directory
22
+ RUN chown -R user:user /data
23
+
24
  # Switch to the non-root user
25
  USER user
26
 
27
  # Set working directory
28
  WORKDIR /home/user
29
 
 
30
  # Add local python bin directory to PATH
31
  ENV PATH="/home/user/.local/bin:${PATH}"
32
 
 
 
 
33
  # AWS Sagemaker compatible image
34
  # Assuming this part remains the same from your original Dockerfile
35
  FROM base as sagemaker
 
62
  GRADIO_THEME=huggingface \
63
  SYSTEM=spaces
64
 
 
 
 
 
 
 
65
  # Copy the current directory contents into the container at $HOME/app setting the owner to the user
66
  COPY --chown=user . $HOME/
67