MonilM commited on
Commit
a4b7659
·
1 Parent(s): ffa3c8d

HF Spaces Fix#2

Browse files
Files changed (3) hide show
  1. Dockerfile +18 -0
  2. README.md +2 -3
  3. entrypoint.sh +4 -0
Dockerfile ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+
3
+ WORKDIR /app
4
+
5
+ COPY . /app/
6
+
7
+ RUN pip install --no-cache-dir -r requirements.txt
8
+
9
+ # Make sure the entrypoint is executable
10
+ RUN chmod +x /app/entrypoint.sh
11
+
12
+ EXPOSE 7860
13
+
14
+ ENV PYTHONUNBUFFERED=1
15
+ ENV DEPLOYMENT_ENV=huggingface
16
+
17
+ # Use entrypoint script to handle startup
18
+ ENTRYPOINT ["/app/entrypoint.sh"]
README.md CHANGED
@@ -3,11 +3,10 @@ title: SongPorter
3
  emoji: 🎵
4
  colorFrom: purple
5
  colorTo: red
6
- sdk: fastapi
7
- sdk_version: 0.103.1
8
  app_file: app.py
9
  pinned: false
10
- short_description: Music recommendation API providing song recommendations and artist information
11
  ---
12
 
13
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
3
  emoji: 🎵
4
  colorFrom: purple
5
  colorTo: red
6
+ sdk: docker
 
7
  app_file: app.py
8
  pinned: false
9
+ short_description: Music recommendation API for songs and artist information
10
  ---
11
 
12
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
entrypoint.sh ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ #!/bin/sh
2
+
3
+ # Start the FastAPI application
4
+ uvicorn app:app --host 0.0.0.0 --port 7860