Spaces:
Runtime error
Runtime error
Commit
·
8086b69
1
Parent(s):
f6de0c3
commit Docker
Browse files- Dockerfile +5 -7
Dockerfile
CHANGED
@@ -9,6 +9,10 @@ RUN useradd -m -u 1000 user
|
|
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,14 +23,8 @@ WORKDIR $HOME/app
|
|
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"]
|
|
|
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 python -c "import temps"
|
15 |
+
|
16 |
# Set environment variables for the user
|
17 |
ENV HOME=/home/user \
|
18 |
PATH=/home/user/.local/bin:$PATH
|
|
|
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"]
|