Spaces:
Runtime error
Runtime error
Create Dockerfile
Browse files- Dockerfile +27 -0
Dockerfile
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Use an official Python runtime as a parent image
|
2 |
+
FROM python:3.9-slim
|
3 |
+
|
4 |
+
# Set the working directory in the container
|
5 |
+
WORKDIR /app
|
6 |
+
|
7 |
+
# Copy the current directory contents into the container at /app
|
8 |
+
COPY . /app
|
9 |
+
|
10 |
+
# Install any needed packages specified in requirements.txt
|
11 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
12 |
+
|
13 |
+
# Install additional system dependencies
|
14 |
+
RUN apt-get update && apt-get install -y \
|
15 |
+
tesseract-ocr \
|
16 |
+
libtesseract-dev \
|
17 |
+
&& rm -rf /var/lib/apt/lists/*
|
18 |
+
|
19 |
+
# Make port 7860 available to the world outside this container
|
20 |
+
EXPOSE 7860
|
21 |
+
|
22 |
+
# Define environment variable
|
23 |
+
ENV GEMINI_API_KEY=${GEMINI_API_KEY}
|
24 |
+
ENV SERP_API_KEY=${SERP_API_KEY}
|
25 |
+
|
26 |
+
# Run app.py when the container launches
|
27 |
+
CMD ["chainlit", "run", "app.py", "--port", "7860"]
|