Spaces:
Runtime error
Runtime error
File size: 1,090 Bytes
0143a6f 9424894 0143a6f 9424894 0143a6f 9424894 e50129b 9424894 e50129b 0143a6f |
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 32 33 34 35 36 37 38 |
# Use a base image with Python
FROM python:3.10
# Set up a new user named "user" with user ID 1000
RUN useradd -m -u 1000 user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
# Install necessary packages, including git
RUN apt-get update && apt-get upgrade -y && apt-get install -y git
# Switch to the "user" user
USER user
# 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
# Install the necessary GitHub repositories
RUN pip install --user git+https://github.com/lauracabayol/TEMPS.git
# Create a directory for the models
RUN mkdir -p $HOME/app/models
# Copy model files into the models directory
COPY --chown=user data/models/modelZ_DA.pt $HOME/app/models/
COPY --chown=user data/models/modelF_DA.pt $HOME/app/models/
# Expose the port the app runs on (if needed)
EXPOSE 7860
# Set the command to run your app, using the Hugging Face port
CMD ["python", "app.py", "--port", "7860", "--server-name", "0.0.0.0"]
|