-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* added load model to api * removed hydra from dockerfile * fix * fixes * path fixes --------- Co-authored-by: Konstantina <[email protected]>
- Loading branch information
Showing
2 changed files
with
26 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,29 @@ | ||
# Change from latest to a specific version if your requirements.txt | ||
# Use Python 3.11-slim as the base image | ||
FROM python:3.11-slim AS base | ||
|
||
# Install necessary dependencies | ||
RUN apt update && \ | ||
apt install --no-install-recommends -y build-essential gcc && \ | ||
apt clean && rm -rf /var/lib/apt/lists/* | ||
|
||
COPY .hydra .hydra/ | ||
COPY models models/ | ||
COPY src src/ | ||
# Set the working directory | ||
WORKDIR /app | ||
|
||
# Copy model files | ||
COPY models/ models/ | ||
|
||
# Copy the source code | ||
COPY src/ src/ | ||
|
||
# Copy the other necessary files | ||
COPY requirements.txt requirements.txt | ||
COPY requirements_dev.txt requirements_dev.txt | ||
COPY README.md README.md | ||
COPY pyproject.toml pyproject.toml | ||
|
||
# Install required Python packages | ||
RUN pip install -r requirements.txt --no-cache-dir --verbose | ||
RUN pip install . --no-deps --no-cache-dir --verbose | ||
|
||
# Set the entry point for the container | ||
ENTRYPOINT ["uvicorn", "src.final_project.api:app", "--host", "0.0.0.0", "--port", "8000"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters