juancopi81 commited on
Commit
85220e3
1 Parent(s): 3a9ffe5

initial commit

Browse files
Files changed (3) hide show
  1. Dockerfile +28 -0
  2. main.py +13 -0
  3. requirements.txt +5 -0
Dockerfile ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.9
2
+
3
+ WORKDIR /code
4
+
5
+ COPY ./requirements.txt /code/requirements.txt
6
+
7
+ RUN apt-get update -qq && \
8
+ apt-get install -qq libfluidsynth1 build-essential libasound2-dev libjack-dev
9
+
10
+ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
11
+
12
+ # Set up a new user named "user" with user ID 1000
13
+ RUN useradd -m -u 1000 user
14
+
15
+ # Switch to the "user" user
16
+ USER user
17
+
18
+ # Set home to the user's home directory
19
+ ENV HOME=/home/user \
20
+ PATH=/home/user/.local/bin:$PATH
21
+
22
+ # Set the working directory to the user's home directory
23
+ WORKDIR $HOME/app
24
+
25
+ # Copy the current directory contents into the container at $HOME/app setting the owner to the user
26
+ COPY --chown=user . $HOME/app
27
+
28
+ CMD ["python", "main.py"]
main.py ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ def run():
4
+ demo = gr.Interface(
5
+ inputs=gr.inputs.Image(type="pil"),
6
+ outputs=gr.outputs.Label(num_top_classes=3),
7
+ )
8
+
9
+ demo.launch(server_name="0.0.0.0", server_port=7860)
10
+
11
+
12
+ if __name__ == "__main__":
13
+ run()
requirements.txt ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ note-seq
2
+ matplotlib
3
+ transformers
4
+ pyfluidsynth==1.3.0
5
+ torch