nalin0503 commited on
Commit
8b5b473
·
1 Parent(s): 8182d33

minor edits

Browse files
Files changed (2) hide show
  1. Dockerfile +0 -61
  2. requirements.txt +2 -2
Dockerfile DELETED
@@ -1,61 +0,0 @@
1
- # Use NVIDIA’s CUDA 12.5.1 with cuDNN (devel) on UBI9
2
- FROM nvidia/cuda:12.5.1-cudnn-devel-ubi9
3
-
4
- # Set non-interactive mode
5
- ENV DEBIAN_FRONTEND=noninteractive
6
-
7
- # Update and install necessary system packages with microdnf
8
- RUN microdnf update -y && \
9
- microdnf install -y \
10
- git \
11
- curl \
12
- gcc \
13
- gcc-c++ \
14
- make \
15
- openssl-devel \
16
- bzip2-devel \
17
- libffi-devel \
18
- zlib-devel \
19
- xz-devel && \
20
- microdnf clean all
21
-
22
- # Build and install Python 3.12.9 from source
23
- RUN curl -L https://www.python.org/ftp/python/3.12.9/Python-3.12.9.tgz -o Python-3.12.9.tgz && \
24
- tar -xf Python-3.12.9.tgz && \
25
- cd Python-3.12.9 && \
26
- ./configure --enable-optimizations && \
27
- make -j $(nproc) && \
28
- make altinstall && \
29
- cd .. && rm -rf Python-3.12.9 Python-3.12.9.tgz && \
30
- ln -s /usr/local/bin/python3.12 /usr/local/bin/python && \
31
- ln -s /usr/local/bin/pip3.12 /usr/local/bin/pip
32
-
33
- # Upgrade pip to the latest version
34
- RUN pip install --upgrade pip
35
-
36
- # Install PyTorch with CUDA 12.5 support
37
- RUN pip install torch torchvision --extra-index-url https://download.pytorch.org/whl/cu125
38
-
39
- # Set the working directory
40
- WORKDIR /app
41
-
42
- # Copy requirements.txt first for caching
43
- COPY requirements.txt .
44
-
45
- # Install Python dependencies
46
- RUN pip install -r requirements.txt
47
-
48
- # Copy the rest of your repository into the container
49
- COPY . .
50
-
51
- # make persistent cache for models
52
- RUN mkdir -p /app/hf_cache /app/torch_cache /app/hf_cache/datasets
53
-
54
- # Set environment variable to mitigate CUDA memory fragmentation
55
- ENV PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True
56
-
57
- # Expose the default Streamlit port
58
- EXPOSE 8501
59
-
60
- # Command to run your Streamlit app
61
- CMD ["streamlit", "run", "app.py", "--server.enableCORS", "false"]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
requirements.txt CHANGED
@@ -10,8 +10,8 @@ Pillow==10.1.0
10
  safetensors==0.4.0
11
  tqdm==4.65.0
12
  transformers==4.34.1
13
- # torch
14
- # torchvision
15
  lpips
16
  # peft
17
  tensorflow==2.18.0
 
10
  safetensors==0.4.0
11
  tqdm==4.65.0
12
  transformers==4.34.1
13
+ torch
14
+ torchvision
15
  lpips
16
  # peft
17
  tensorflow==2.18.0