-
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
younesselrag
committed
Sep 9, 2024
1 parent
a549b09
commit c8f5bce
Showing
3 changed files
with
39 additions
and
60 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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM pytorch/pytorch:2.4.0-cuda12.1-cudnn9-devel | ||
|
||
ENV PYTHONUNBUFFERED 1 | ||
|
||
WORKDIR /usr/src/app | ||
|
||
# Install packages | ||
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/* | ||
|
||
COPY requirements.txt ./ | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
|
||
COPY . . |
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,21 @@ | ||
# Copyright (C) 2024 Youness Elbrag | ||
|
||
FROM nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu20.04 | ||
|
||
RUN apt-get update && apt-get install -y software-properties-common | ||
RUN add-apt-repository ppa:deadsnakes/ppa | ||
RUN apt-get update && apt-get install -y python3.10 python3.10-venv python3-pip ffmpeg | ||
|
||
WORKDIR /Server-fastapi | ||
COPY . . | ||
|
||
RUN python3.10 -m venv venv | ||
RUN /bin/bash -c "source venv/bin/activate && pip install --upgrade pip" | ||
RUN /bin/bash -c "source venv/bin/activate && pip install -e ." | ||
RUN /bin/bash -c "source venv/bin/activate && pip install -r fastapi/requirements-fastapi-cuda.txt" | ||
|
||
WORKDIR /Server-fastapi/backend | ||
|
||
EXPOSE 8000 | ||
|
||
CMD ["../venv/bin/uvicorn", "api.app: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