jebin2 commited on
Commit
263914c
·
1 Parent(s): 0cc9f78

Add application file

Browse files
Files changed (5) hide show
  1. .gitignore +1 -0
  2. Dockerfile +34 -0
  3. main.py +3 -0
  4. requirements-system.txt +3 -0
  5. requirements.txt +1 -0
.gitignore ADDED
@@ -0,0 +1 @@
 
 
1
+ .env
Dockerfile ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use official Python slim image
2
+ FROM python:3.10-slim
3
+
4
+ # Set working directory
5
+ WORKDIR /app
6
+
7
+ # Set environment variables
8
+ ENV PIP_ROOT_USER_ACTION=ignore
9
+ ENV MUSIC_COMPOSER_BASE_PATH=/tmp
10
+ ENV OUTPUT_WAV=/tmp/output.wav
11
+ ENV IS_DOCKER=True
12
+ ENV SERVER_PORT=7860
13
+ ENV HOME=/root
14
+ ENV NEW_STATIC_PATH=/tmp
15
+
16
+ COPY requirements-system.txt .
17
+ # Install OS-level dependencies
18
+ RUN apt-get update && \
19
+ xargs apt-get install -y --no-install-recommends < /app/requirements-system.txt && \
20
+ rm -rf /var/lib/apt/lists/*
21
+
22
+ # Install Python dependencies
23
+ COPY requirements.txt .
24
+ RUN pip install --upgrade pip
25
+ RUN pip install --no-cache-dir -r requirements.txt
26
+
27
+ # Copy app code
28
+ COPY . .
29
+
30
+ # Expose app port
31
+ EXPOSE 7860
32
+
33
+ # Run the app
34
+ CMD ["python", "main.py"]
main.py ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ from music_composer import web_server
2
+
3
+ web_server.run_server()
requirements-system.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ git
2
+ fluidsynth
3
+ libfluidsynth-dev
requirements.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ git+https://github.com/jebin2/music_composer_py.git