Yaron Koresh commited on
Commit
8768b5d
·
verified ·
1 Parent(s): 6d255f1

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +26 -0
Dockerfile ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ WORKDIR /code
2
+ COPY ./environment.yml /code/environment.yml
3
+
4
+ # Create the environment using the environment.yml file
5
+ RUN conda env create -f /code/environment.yml
6
+
7
+ # Set up a new user named "user" with user ID 1000
8
+ RUN useradd -m -u 1000 user
9
+ # Switch to the "user" user
10
+ USER user
11
+ # Set home to the user's home directory
12
+ ENV HOME=/home/user \
13
+ PYTHONUNBUFFERED=1 \
14
+ GRADIO_ALLOW_FLAGGING=never \
15
+ GRADIO_NUM_PORTS=1 \
16
+ GRADIO_SERVER_NAME=0.0.0.0 \
17
+ GRADIO_THEME=huggingface \
18
+ SYSTEM=spaces
19
+
20
+ # Set the working directory to the user's home directory
21
+ WORKDIR $HOME/app
22
+
23
+ # Copy the current directory contents into the container at $HOME/app setting the owner to the user
24
+ COPY --chown=user . $HOME/app
25
+
26
+ CMD ["./start.sh"]