Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
joanfabregat committed Dec 20, 2024
1 parent c873983 commit 59441e0
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/.git*
/docker-compose.yaml
16 changes: 7 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,17 @@ ARG PORT=5000
ENV debian_frontend=noninteractive
ENV PYTHONUNBUFFERED=1

# Set the working directory in the container
WORKDIR /app

RUN apt-get update && apt-get install -y \
libmagic1 \
&& rm -rf /var/lib/apt/lists/*
# Copy the source code to the container
COPY . .

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

RUN pip install --no-cache-dir -r requirements.txt

COPY app.py .
COPY entrypoint.sh .
# Run the application
RUN chmod +x entrypoint.sh

EXPOSE $PORT
ENTRYPOINT ["/app/entrypoint.sh"]
1 change: 0 additions & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
async def health():
return JSONResponse(content={"status": "up", "timestamp": datetime.now().isoformat()})


@app.post("/extract", response_model=ExtractResponse)
async def extract(file: UploadFile = File(...)):
if file.content_type != "application/pdf":
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,5 @@ pydantic_core==2.27.2
PyMuPDF==1.25.1
python-multipart==0.0.20
sniffio==1.3.1
starlette==0.42.0
typing_extensions==4.12.2
uvicorn==0.34.0

0 comments on commit 59441e0

Please sign in to comment.