File size: 763 Bytes
9ab1a01
 
 
3459eb7
 
 
 
48e9e1d
 
 
 
9ab1a01
 
 
3459eb7
9ab1a01
 
 
 
 
 
ea25f01
9ab1a01
 
48e9e1d
9ab1a01
 
48e9e1d
9ab1a01
 
48e9e1d
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
28
29
30
31
32
# Use an official Python image as the base image
FROM python:3.8-slim

# Install system dependencies
RUN apt-get update && apt-get install


RUN useradd -m -u 1000 user
USER user
ENV PATH="/home/user/.local/bin:$PATH"

# Set the working directory inside the container
WORKDIR /app



# Install PyTorch
RUN pip install --upgrade pip
RUN pip install torch torchvision

# Install Hugging Face Transformers and other dependencies
RUN pip install transformers librosa deep-translator python-multipart fastapi uvicorn sentencepiece

# Copy the main script
COPY --chown=user main.py .

# Expose the port the app runs on
EXPOSE 7860

# Set the default command to run your FastAPI app or any other server
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]