File size: 918 Bytes
af99cc1
 
 
 
 
 
 
 
 
b14f583
 
6cb9ed8
af99cc1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
ARG DASH_ACOUSTIC
FROM python:3.10

LABEL maintainer="Hannes Kath hannes.kath@dfki.de"

# Set the working directory
WORKDIR /git_app

# Copy the current directory contents into the container
COPY . /git_app

ADD requirements.txt /git_app/requirements.txt

# Install dependencies
RUN pip install --upgrade pip setuptools wheel
RUN python3 -m pip install -r requirements.txt

# 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

# Run your application
CMD ["python3", "app.py", "--host", "0.0.0.0", "--port", "7860"]