File size: 663 Bytes
a8bde12
db50748
a8bde12
 
bda2594
8074118
db50748
 
2c220ca
db50748
 
2c220ca
 
 
8074118
bda2594
db50748
a8bde12
bda2594
db50748
bda2594
8074118
6399190
 
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
# Base image
FROM python:3.10-slim

# Set the working directory in the container
WORKDIR /app

# Set environment variables for caches
ENV MPLCONFIGDIR=/app/matplotlib_cache
ENV HF_HOME=/app/transformers_cache  
ENV HOME=/app

# Create and set permissions for directories
RUN mkdir -p /app/matplotlib_cache /app/transformers_cache && \
    chmod -R 777 /app/matplotlib_cache /app/transformers_cache

# Install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Copy your application files
COPY . .

# Command to run your application on a non-privileged port
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8080"]