File size: 758 Bytes
7380009
251c69c
b2a64fe
7380009
d056195
b2a64fe
aad72ce
 
 
 
5f98e1b
 
b2a64fe
7380009
 
 
b2a64fe
7380009
 
 
 
 
 
 
 
b2a64fe
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Use an official Python runtime as a base image
from python:3.11.1-buster

# Set the working directory
WORKDIR /app

# Create a writable cache directory for Hugging Face
RUN mkdir -p /app/hf_cache && chmod -R 777 /app/hf_cache

# Set the environment variable for the Hugging Face cache
ENV HF_HOME=/app/hf_cache


# Copy the requirements.txt file and install the dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Copy the current directory contents into the container at /app
COPY . .

# Hugging Face Spaces will expose port 7860 by default for web applications
EXPOSE 7860

# Command to run the transcription script or API server on Hugging Face
CMD ["uvicorn", "infer:app", "--host", "0.0.0.0", "--port", "7860"]