izaheeerr commited on
Commit
14df454
·
verified ·
1 Parent(s): 3b03169

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +23 -0
Dockerfile ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 1. Use a Python image
2
+ FROM python:3.10-slim
3
+
4
+ # 2. Install FFMPEG (The tool needed to process audio)
5
+ RUN apt-get update && apt-get install -y ffmpeg && rm -rf /var/lib/apt/lists/*
6
+
7
+ # 3. Create a user so Hugging Face is secure
8
+ RUN useradd -m -u 1000 user
9
+ USER user
10
+ ENV HOME=/home/user \
11
+ PATH=/home/user/.local/bin:$PATH
12
+ WORKDIR $HOME/app
13
+
14
+ # 4. Copy your requirements and install them
15
+ COPY --chown=user requirements.txt .
16
+ RUN pip install --no-cache-dir -r requirements.txt
17
+
18
+ # 5. Copy all your project files into the cloud
19
+ COPY --chown=user . .
20
+
21
+ # 6. Start the Django server
22
+ # NOTE: Replace 'my_project' with the name of the folder containing your wsgi.py
23
+ CMD python manage.py migrate && gunicorn core.wsgi:application --bind 0.0.0.0:7860