DoNotSelect commited on
Commit
afedff6
1 Parent(s): f416e26

Change to docker

Browse files
Files changed (2) hide show
  1. Dockerfile +31 -0
  2. README.md +2 -3
Dockerfile ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.9
2
+
3
+ WORKDIR /code
4
+
5
+ COPY ./requirements.txt /code/requirements.txt
6
+
7
+ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
8
+ RUN pip install --no-cache-dir --no-build-isolation pyworld
9
+
10
+ # Set up a new user named "user" with user ID 1000
11
+ RUN useradd -m -u 1000 user
12
+ # Switch to the "user" user
13
+ USER user
14
+ # Set home to the user's home directory
15
+ ENV HOME=/home/user \
16
+ PATH=/home/user/.local/bin:$PATH \
17
+ PYTHONPATH=$HOME/app \
18
+ PYTHONUNBUFFERED=1 \
19
+ GRADIO_ALLOW_FLAGGING=never \
20
+ GRADIO_NUM_PORTS=1 \
21
+ GRADIO_SERVER_NAME=0.0.0.0 \
22
+ GRADIO_THEME=huggingface \
23
+ SYSTEM=spaces
24
+
25
+ # Set the working directory to the user's home directory
26
+ WORKDIR $HOME/app
27
+
28
+ # Copy the current directory contents into the container at $HOME/app setting the owner to the user
29
+ COPY --chown=user . $HOME/app
30
+
31
+ CMD ["python", "app.py"]
README.md CHANGED
@@ -3,11 +3,10 @@ title: AI-minato Aqua
3
  emoji: 🐠
4
  colorFrom: blue
5
  colorTo: pink
6
- sdk: gradio
7
- sdk_version: 3.15.0
8
  app_file: app.py
9
  pinned: false
10
- license: other
11
  ---
12
 
13
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
3
  emoji: 🐠
4
  colorFrom: blue
5
  colorTo: pink
6
+ sdk: docker
 
7
  app_file: app.py
8
  pinned: false
9
+ license: mit
10
  ---
11
 
12
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference