This repository was archived by the owner on Jan 14, 2025. It is now read-only.
-
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.
- Loading branch information
1 parent
18a348c
commit de7127a
Showing
6 changed files
with
57 additions
and
18 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,4 +1,4 @@ | ||
FROM python:3.12.3-slim | ||
FROM python:3.12.7-slim | ||
WORKDIR /app | ||
COPY . /app | ||
RUN pip install --upgrade pip | ||
|
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,8 +1,9 @@ | ||
FROM nvidia/cuda:12.5.0-runtime-ubuntu22.04 | ||
FROM nvidia/cuda:12.6.2-runtime-ubuntu24.04 | ||
WORKDIR /app | ||
COPY . /app | ||
RUN apt-get update && \ | ||
apt-get install -y python3-pip && \ | ||
pip install --upgrade pip | ||
RUN pip install --no-cache-dir -r requirements.txt --extra-index-url https://download.pytorch.org/whl/cu121 | ||
CMD ["fastapi", "run", "main.py", "--proxy-headers", "--host", "0.0.0.0", "--port", "8000"] | ||
apt-get install -y python3-pip python3-venv && \ | ||
python3 -m venv /app/venv && \ | ||
/app/venv/bin/pip install --upgrade pip && \ | ||
/app/venv/bin/pip install --no-cache-dir -r requirements.txt --extra-index-url https://download.pytorch.org/whl/cu121 | ||
CMD ["/app/venv/bin/python", "-m", "fastapi", "run", "main.py", "--proxy-headers", "--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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
services: | ||
cuda: | ||
build: | ||
context: . | ||
dockerfile: ./Dockerfile.cuda | ||
ports: | ||
- "8000:8000" | ||
volumes: | ||
- ./models:/root/.cache/huggingface/hub:rw | ||
environment: | ||
- DEFAULT_MODEL_NAME | ||
- BATCH_SIZE | ||
- ACCESS_TOKEN | ||
- DEFAULT_SCORE | ||
- USE_API_KEYS | ||
- API_KEYS | ||
restart: unless-stopped | ||
deploy: | ||
resources: | ||
reservations: | ||
devices: | ||
- driver: nvidia | ||
count: all | ||
capabilities: [ gpu ] |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
services: | ||
cpu: | ||
build: | ||
context: . | ||
dockerfile: ./Dockerfile | ||
ports: | ||
- "8000:8000" | ||
volumes: | ||
- ./models:/root/.cache/huggingface/hub:rw | ||
environment: | ||
- DEFAULT_MODEL_NAME | ||
- BATCH_SIZE | ||
- ACCESS_TOKEN | ||
- DEFAULT_SCORE | ||
- USE_API_KEYS | ||
- API_KEYS | ||
restart: unless-stopped |
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
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,8 +1,8 @@ | ||
fastapi[standard]==0.112.0 | ||
Pillow==10.4.0 | ||
transformers==4.44.0 | ||
torch==2.4.0 | ||
fastapi[standard]==0.115.3 | ||
Pillow==11.0.0 | ||
transformers==4.46.0 | ||
torch==2.5.0 | ||
python-dotenv==1.0.1 | ||
filetype==1.2.0 | ||
opencv-python-headless==4.10.0.84 | ||
python-multipart==0.0.9 | ||
python-multipart==0.0.12 |