File size: 576 Bytes
3d474fd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4d1c551
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
FROM python:3.11.9-slim

# Copy requirements file
COPY requirements.txt .

# Update pip
RUN pip --timeout=3000 install --no-cache-dir --upgrade pip

# Install dependecies
RUN pip --timeout=3000 install --no-cache-dir -r requirements.txt

# Make api
RUN mkdir -p /api/

# Set app as the working directory
WORKDIR /api

# Make sqlite directory
RUN mkdir -p /api/database/

# Set the permissions
RUN chmod -R 770 /api/database

# Copy api
COPY . .

# Expose app port Huggingface 
EXPOSE 7860

# Start application
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]