Spaces:
Build error
Build error
File size: 1,716 Bytes
8d31403 e022ad0 df2f50c ccf65e4 370ceeb ccf65e4 b34f5ac ccf65e4 370ceeb ccf65e4 b34f5ac dbd8478 b34f5ac ccf65e4 b2e560e fe64f00 ccf65e4 |
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 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
ARG DASH_ACOUSTIC
FROM python:3.10
LABEL maintainer="Hannes Kath hannes.kath@dfki.de"
# Define build arguments for accessing the repository
ARG GITLAB_DEPLOYTOKEN_USERNAME=gitlab+deploy-token-94
ARG GITLAB_DEPLOYTOKEN_PASSWORD=gldt-TQBhFs28iZUJSwVSBfR8
# Set the Git repository URL with deploy token
ARG REPO_URL=https://$GITLAB_DEPLOYTOKEN_USERNAME:$GITLAB_DEPLOYTOKEN_PASSWORD@git.ni.dfki.de/iml/cst/pam_al_ui.git
# test configuration
#ARG GITLAB_DEPLOYTOKEN_USERNAME=gitlab+deploy-token-96
#ARG GITLAB_DEPLOYTOKEN_PASSWORD=gldt-LiJf7Qbsgs2DsWmR3JwK
#ARG REPO_URL=https://$GITLAB_DEPLOYTOKEN_USERNAME:$GITLAB_DEPLOYTOKEN_PASSWORD@git.ni.dfki.de/iml/cst/hannes-iterative-learning-pam/pam.user_interface.git
# Clone the Git repository
RUN git clone ${REPO_URL} /git_app
# Switch to the cloned directory
WORKDIR /git_app
# Change to the versio branch
RUN git checkout version
# Install dependencies
RUN pip install --upgrade pip setuptools wheel
RUN python3 -m pip install -r requirements.txt
### works until here ###
# Set up a new user named "user" with user ID 1000
RUN useradd -m -u 1000 user
# Switch to the "user" user
USER user
# Set the working directory to the user's home directory
WORKDIR $HOME/git_app
# Make port available to the world outside this container
EXPOSE 7860/tcp
# Define environment variable
ENV NAME Acoustic
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
COPY --chown=user . $HOME/git_app
# add directory /git_app to the save list so that it is possible to get branch, hash, tag
RUN git config --global --add safe.directory /git_app
# Run your application
CMD ["python3", "app.py", "--host", "0.0.0.0", "--port", "7860"] |