Spaces:
Sleeping
Sleeping
tony-42069
commited on
Commit
·
f53cb7b
1
Parent(s):
afb405a
Fix Dockerfile and Git LFS configuration for PDF file
Browse files- .gitattributes +2 -0
- Dockerfile +14 -2
.gitattributes
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
*.pdf filter=lfs diff=lfs merge=lfs -text
|
2 |
+
Dataset/*.pdf filter=lfs diff=lfs merge=lfs -text
|
Dockerfile
CHANGED
@@ -1,12 +1,24 @@
|
|
1 |
-
FROM python:3.
|
2 |
|
3 |
-
WORKDIR /app
|
4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
COPY requirements.txt .
|
6 |
RUN pip install -r requirements.txt
|
7 |
|
|
|
8 |
COPY . .
|
9 |
|
|
|
|
|
|
|
|
|
|
|
10 |
# Make port configurable via environment variable
|
11 |
ENV PORT=8501
|
12 |
|
|
|
1 |
+
FROM python:3.10-slim
|
2 |
|
3 |
+
WORKDIR /home/user/app
|
4 |
|
5 |
+
# Install git and git-lfs
|
6 |
+
RUN apt-get update && \
|
7 |
+
apt-get install -y git git-lfs && \
|
8 |
+
rm -rf /var/lib/apt/lists/*
|
9 |
+
|
10 |
+
# Copy requirements first for better caching
|
11 |
COPY requirements.txt .
|
12 |
RUN pip install -r requirements.txt
|
13 |
|
14 |
+
# Copy the rest of the application
|
15 |
COPY . .
|
16 |
|
17 |
+
# Explicitly copy and verify the PDF file
|
18 |
+
COPY Dataset/Commercial\ Lending\ 101.pdf /home/user/app/Dataset/
|
19 |
+
RUN ls -l /home/user/app/Dataset/Commercial\ Lending\ 101.pdf && \
|
20 |
+
echo "PDF file size: $(stat -f%z /home/user/app/Dataset/Commercial\ Lending\ 101.pdf) bytes"
|
21 |
+
|
22 |
# Make port configurable via environment variable
|
23 |
ENV PORT=8501
|
24 |
|