pmolchanov commited on
Commit
356849d
·
verified ·
1 Parent(s): 9da6d0b

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +34 -0
Dockerfile ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM ghcr.io/tilmto/hymba:v1
2
+
3
+ ARG DEBIAN_FRONTEND=noninteractive
4
+
5
+ ENV PYTHONUNBUFFERED=1
6
+
7
+ WORKDIR /code
8
+
9
+ # COPY ./requirements.txt /code/requirements.txt
10
+
11
+ # Set up a new user named "user" with user ID 1000
12
+ RUN useradd -m -u 1000 user
13
+ # Switch to the "user" user
14
+ USER user
15
+ # Set home to the user's home directory
16
+ ENV HOME=/home/user \
17
+ PATH=/home/user/.local/bin:$PATH \
18
+ PYTHONPATH=$HOME/app \
19
+ PYTHONUNBUFFERED=1 \
20
+ GRADIO_ALLOW_FLAGGING=never \
21
+ GRADIO_NUM_PORTS=1 \
22
+ GRADIO_SERVER_NAME=0.0.0.0 \
23
+ GRADIO_THEME=huggingface \
24
+ SYSTEM=spaces
25
+
26
+ #RUN pip3 install --no-cache-dir --upgrade -r /code/requirements.txt
27
+
28
+ # Set the working directory to the user's home directory
29
+ WORKDIR $HOME/app
30
+
31
+ # Copy the current directory contents into the container at $HOME/app setting the owner to the user
32
+ COPY --chown=user . $HOME/app
33
+
34
+ CMD ["python3", "app.py"]