File size: 788 Bytes
7320352
 
 
 
 
 
 
 
 
 
 
 
8864a83
 
 
 
7320352
 
 
 
 
ad8b23e
 
8864a83
 
7320352
 
1f1d0a3
ad8b23e
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
# Use the official Python image as a parent image
FROM python:3.11.3-slim

# Set the working directory within the container
WORKDIR /app

# Copy the requirements.txt file into the container
COPY ./requirements.txt /app/requirements.txt

# Install the Python dependencies
RUN pip install -r /app/requirements.txt

# Set MPLCONFIGDIR to /tmp
ENV MPLCONFIGDIR /tmp

# Copy your Gradio application code into the container
COPY ./app.py /app/app.py

# Copy the model and key components into the container
COPY ./rf_key_components.pkl /app/rf_key_components.pkl

# Set the correct permissions on /tmp and /app
RUN chmod 1777 /tmp && chmod -R 777 /app

# Expose port 7860 for the Gradio application
EXPOSE 7860

# Command to run the Gradio app when the container starts
CMD ["python", "app.py"]