File size: 1,745 Bytes
52e7e4d
 
 
 
 
 
8d8cb5d
 
b729c77
52e7e4d
 
8d8cb5d
 
 
 
 
 
 
 
52e7e4d
 
 
 
 
90516eb
52e7e4d
90516eb
52e7e4d
90516eb
52e7e4d
 
 
 
 
 
 
 
 
 
 
 
 
 
90516eb
52e7e4d
 
 
 
 
 
 
 
90516eb
52e7e4d
 
 
 
 
 
75eac89
52e7e4d
 
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
55
56
57
58
59
60
61
62
63
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"]