youssef
commited on
Commit
·
bd727fa
1
Parent(s):
1e8de5f
flash attn
Browse files- Dockerfile +1 -1
- src/app.py +7 -0
Dockerfile
CHANGED
@@ -43,7 +43,7 @@ RUN pyenv install ${PYTHON_VERSION} && \
|
|
43 |
|
44 |
COPY --chown=1000 ./requirements.txt /tmp/requirements.txt
|
45 |
RUN pip install --no-cache-dir --upgrade -r /tmp/requirements.txt && \
|
46 |
-
pip install --no-cache-dir https://github.com/
|
47 |
|
48 |
COPY --chown=1000 . ${HOME}/app
|
49 |
ENV PYTHONPATH=${HOME}/app \
|
|
|
43 |
|
44 |
COPY --chown=1000 ./requirements.txt /tmp/requirements.txt
|
45 |
RUN pip install --no-cache-dir --upgrade -r /tmp/requirements.txt && \
|
46 |
+
pip install --no-cache-dir https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.3/flash_attn-2.7.3+cu12torch2.6cxx11abiFALSE-cp310-cp310-linux_x86_64.whl
|
47 |
|
48 |
COPY --chown=1000 . ${HOME}/app
|
49 |
ENV PYTHONPATH=${HOME}/app \
|
src/app.py
CHANGED
@@ -8,6 +8,13 @@ import spaces
|
|
8 |
logging.basicConfig(level=logging.INFO)
|
9 |
logger = logging.getLogger(__name__)
|
10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
@spaces.GPU
|
12 |
def on_process(video):
|
13 |
# Clear all components when starting new processing
|
|
|
8 |
logging.basicConfig(level=logging.INFO)
|
9 |
logger = logging.getLogger(__name__)
|
10 |
|
11 |
+
# Print version information
|
12 |
+
logger.info(f"PyTorch version: {torch.__version__}")
|
13 |
+
logger.info(f"CUDA available: {torch.cuda.is_available()}")
|
14 |
+
if torch.cuda.is_available():
|
15 |
+
logger.info(f"CUDA version: {torch.version.cuda}")
|
16 |
+
logger.info(f"GPU device: {torch.cuda.get_device_name(0)}")
|
17 |
+
|
18 |
@spaces.GPU
|
19 |
def on_process(video):
|
20 |
# Clear all components when starting new processing
|