lauracabayol commited on
Commit
f6de0c3
·
1 Parent(s): f1d1f5d

commit Docker

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -5
Dockerfile CHANGED
@@ -9,10 +9,6 @@ RUN useradd -m -u 1000 user
9
  # Switch to the "user" user
10
  USER user
11
 
12
- # Install the necessary GitHub repositories
13
- RUN pip install git+https://github.com/lauracabayol/TEMPS.git
14
- RUN pip install -e /home/user/TEMPS
15
-
16
  # Set environment variables for the user
17
  ENV HOME=/home/user \
18
  PATH=/home/user/.local/bin:$PATH
@@ -23,8 +19,14 @@ WORKDIR $HOME/app
23
  # Copy the current directory contents into the container at $HOME/app, setting the owner to the user
24
  COPY --chown=user . $HOME/app
25
 
 
 
 
 
 
 
26
  # Expose the port (not mandatory as Hugging Face manages this, but can remain for clarity)
27
  EXPOSE 7860
28
 
29
  # Set the command to run your app, using the Hugging Face port
30
- CMD ["python", "temps/app.py", "--port", "$PORT", "--server-name", "0.0.0.0"]
 
9
  # Switch to the "user" user
10
  USER user
11
 
 
 
 
 
12
  # Set environment variables for the user
13
  ENV HOME=/home/user \
14
  PATH=/home/user/.local/bin:$PATH
 
19
  # Copy the current directory contents into the container at $HOME/app, setting the owner to the user
20
  COPY --chown=user . $HOME/app
21
 
22
+ # Install the necessary GitHub repositories after copying the contents
23
+ RUN pip install git+https://github.com/lauracabayol/TEMPS.git
24
+
25
+ # Install the local repository in editable mode
26
+ RUN pip install -e $HOME/app
27
+
28
  # Expose the port (not mandatory as Hugging Face manages this, but can remain for clarity)
29
  EXPOSE 7860
30
 
31
  # Set the command to run your app, using the Hugging Face port
32
+ CMD ["python", "temps/app.py", "--port", "$PORT", "--server-name", "0.0.0.0"]