Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +1 -12
Dockerfile
CHANGED
@@ -1,25 +1,14 @@
|
|
1 |
FROM python:3.9-slim
|
2 |
|
3 |
WORKDIR /app
|
4 |
-
|
5 |
-
# Copy all files
|
6 |
COPY . /app
|
7 |
|
8 |
-
# Install system dependencies
|
9 |
RUN apt-get update && apt-get install -y \
|
10 |
tesseract-ocr \
|
11 |
libtesseract-dev \
|
12 |
&& rm -rf /var/lib/apt/lists/*
|
13 |
|
14 |
-
# Install Python dependencies
|
15 |
RUN pip install --no-cache-dir -r requirements.txt
|
16 |
|
17 |
-
# Create a non-root user and give permissions to /app
|
18 |
-
RUN useradd -m myuser && chown -R myuser:myuser /app
|
19 |
-
USER myuser
|
20 |
-
|
21 |
-
# Expose port 7860
|
22 |
EXPOSE 7860
|
23 |
-
|
24 |
-
# Run the app
|
25 |
-
CMD ["chainlit", "run", "app.py", "--port", "7860"]
|
|
|
1 |
FROM python:3.9-slim
|
2 |
|
3 |
WORKDIR /app
|
|
|
|
|
4 |
COPY . /app
|
5 |
|
|
|
6 |
RUN apt-get update && apt-get install -y \
|
7 |
tesseract-ocr \
|
8 |
libtesseract-dev \
|
9 |
&& rm -rf /var/lib/apt/lists/*
|
10 |
|
|
|
11 |
RUN pip install --no-cache-dir -r requirements.txt
|
12 |
|
|
|
|
|
|
|
|
|
|
|
13 |
EXPOSE 7860
|
14 |
+
CMD ["python", "app.py"]
|
|
|
|