long-time-scale / Dockerfile
rida saghir
Still testing image
8d8cb5d
ARG GRADIO_ACOUSTIC
FROM python:3.9.6
LABEL maintainer="Rida Saghir ridasagheer94@gmail.com"
# Define build arguments for accessing the repository
#ARG GITLAB_DEPLOYTOKEN_USERNAME=gitlab+deploy+lts
#ARG GITLAB_DEPLOYTOKEN_PASSWORD=gldt-xMH79XLsNs3swTMZsmqv
# Set the Git repository URL with deploy token
#ARG REPO_URL=https://$GITLAB_DEPLOYTOKEN_USERNAME:$GITLAB_DEPLOYTOKEN_PASSWORD@git.ni.dfki.de/iml/cst/long-time-scale/timeseries-interface.git
# FOR FCS FEATURE, PULL THIS
ARG GITLAB_DEPLOYTOKEN_USERNAME=gitlab+deploy-token-99
ARG GITLAB_DEPLOYTOKEN_PASSWORD=gldt-ER9dUDDw4bH3hYzggfoJ
ARG REPO_URL=https://$GITLAB_DEPLOYTOKEN_USERNAME:$GITLAB_DEPLOYTOKEN_PASSWORD@git.ni.dfki.de/iml/cst/long-time-scale/long-time-scale-with-fcs.git
# Clone the Git repository
RUN git clone ${REPO_URL} /lts_app
# Set the working directory
WORKDIR /lts_app
RUN git checkout main
RUN chmod 777 /lts_app
RUN mkdir /demo
RUN chmod 777 /demo
# Install dependencies
RUN pip install -r requirements.txt
#RUN apt-get update && apt-get install -y libsndfile1
# 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/lts_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/lts_app
# add directory /lts_app to the save list so that it is possible to get branch, hash, tag
RUN git config --global --add safe.directory /lts_app
# Run your application
CMD ["python3", "app.py", "--host", "0.0.0.0", "--port", "7860"]