Hameed13 commited on
Commit
76b8150
·
verified ·
1 Parent(s): bbcd789

Upload Dockerfile with huggingface_hub

Browse files
Files changed (1) hide show
  1. Dockerfile +27 -0
Dockerfile ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.9
2
+
3
+ # Install system dependencies
4
+ RUN apt-get update && apt-get install -y \
5
+ wget \
6
+ git \
7
+ && rm -rf /var/lib/apt/lists/*
8
+
9
+ # Create a non-root user
10
+ RUN useradd -m -u 1000 user
11
+ USER user
12
+ ENV PATH="/home/user/.local/bin:$PATH"
13
+
14
+ WORKDIR /app
15
+
16
+ # Copy requirements file
17
+ COPY --chown=user ./requirements.txt requirements.txt
18
+ RUN pip install --no-cache-dir --upgrade -r requirements.txt
19
+
20
+ # Copy application code
21
+ COPY --chown=user . /app
22
+
23
+ # Create directory for audio files
24
+ RUN mkdir -p /app/audio_files
25
+
26
+ # Run the application
27
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]