File size: 972 Bytes
9424894
 
 
 
 
 
 
 
 
 
 
8086b69
a1f52fb
 
8086b69
 
9424894
 
 
 
 
 
 
 
 
 
 
 
 
 
8086b69
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
FROM pytorch/pytorch:latest

# Install necessary packages, including git
RUN apt-get update && apt-get upgrade -y && apt-get install -y git

# Set up a new user named "user" with user ID 1000
RUN useradd -m -u 1000 user

# Switch to the "user" user
USER user

# Install the necessary GitHub repositories
RUN pip install git+https://github.com/lauracabayol/TEMPS.git && \
    pip show temps
RUN python -c "import temps"

# Set environment variables for the user
ENV HOME=/home/user \
    PATH=/home/user/.local/bin:$PATH

# Set the working directory to the user's app directory
WORKDIR $HOME/app

# Copy the current directory contents into the container at $HOME/app, setting the owner to the user
COPY --chown=user . $HOME/app

# Expose the port (not mandatory as Hugging Face manages this, but can remain for clarity)
EXPOSE 7860

# Set the command to run your app, using the Hugging Face port
CMD ["python", "temps/app.py", "--port", "$PORT", "--server-name", "0.0.0.0"]