Spaces:
Sleeping
Sleeping
File size: 11,826 Bytes
84f44e8 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 |
FROM python:3.8
# Install required system dependencies
RUN apt-get update && apt-get install -y libopenblas-dev git curl && rm -rf /var/lib/apt/lists/*
# Set the working directory inside the container
WORKDIR /app
# Copy the requirements file into the container
COPY requirements.txt .
# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Create necessary directories (but don't download models here!)
RUN mkdir -p /app/modelsBioembedSmall /app/models_folder /app/Samples /app/numba_cache /app/hf_cache
# Copy the entire project to the container
COPY . .
# Expose the port for Flask
EXPOSE 7860
# Run the app with Gunicorn
CMD ["gunicorn", "-b", "0.0.0.0:7860", "app:app", "-w", "2", "--timeout", "300"]
# # Use Python 3.8 as the base image
# FROM python:3.8
# # Install required system dependencies
# RUN apt-get update && apt-get install -y libopenblas-dev git wget && rm -rf /var/lib/apt/lists/*
# # Set the working directory inside the container
# WORKDIR /app
# # Copy the requirements file into the container
# COPY requirements.txt .
# # Install dependencies
# RUN pip install --no-cache-dir -r requirements.txt
# # Create necessary directories inside the container
# RUN mkdir -p /app/modelsBioembed /app/models_folder /app/Samples
# # Download model files from Dropbox using wget
# RUN wget -O /app/modelsBioembed/pytorch_model.bin "https://www.dropbox.com/scl/fi/b41t8c6ji7j6uk5y2jj8g/pytorch_model.bin?rlkey=kuuwkid36ugml560c4a465ilr&st=t60bfemx&dl=1" && \
# wget -O /app/modelsBioembed/config.json "https://www.dropbox.com/scl/fi/js6czj3kfc4a5kshfkzie/config.json?rlkey=5oysq4ecilnan5tviuqe86v93&st=75zpce8h&dl=1" && \
# wget -O /app/modelsBioembed/special_tokens_map.json "https://www.dropbox.com/scl/fi/t3lvmp5x28d1zjac3j7ec/special_tokens_map.json?rlkey=z2xbompa54iu4y9qgb5bvmfc9&st=zrxlpjdt&dl=1" && \
# wget -O /app/modelsBioembed/tokenizer_config.json "https://www.dropbox.com/scl/fi/x11poym6mueoxod7xb6f1/tokenizer_config.json?rlkey=s51pik2rkmqp1fu99qj9qaria&st=z9kkcxp7&dl=1" && \
# wget -O /app/modelsBioembed/vocab.txt "https://www.dropbox.com/scl/fi/v6e2gn10ck4lpx4iv9kpe/vocab.txt?rlkey=dcu29g5ns4wtqdv0pkks0ehx1&st=qt187rhq&dl=1"
# # Copy the entire project to the container
# COPY . .
# # Expose the port for Flask
# EXPOSE 8000
# # Run the app with Gunicorn
# CMD ["gunicorn", "-b", "0.0.0.0:8000", "app:app"]
# # Use Python 3.8 as the base image
# FROM python:3.8
# # Install required system dependencies
# RUN apt-get update && apt-get install -y libopenblas-dev git wget && rm -rf /var/lib/apt/lists/*
# # Set the working directory inside the container
# WORKDIR /app
# # Copy the requirements file into the container
# COPY requirements.txt .
# # Install dependencies
# RUN pip install --no-cache-dir -r requirements.txt
# # Create necessary directories inside the container
# RUN mkdir -p /app/modelsBioembed /app/models_folder /app/Samples
# # Download model files from Dropbox using wget
# RUN wget -O /app/modelsBioembed/pytorch_model.bin "https://www.dropbox.com/s/example/pytorch_model.bin?dl=1" && \
# wget -O /app/modelsBioembed/config.json "https://www.dropbox.com/s/example/config.json?dl=1" && \
# wget -O /app/modelsBioembed/tokenizer_config.json "https://www.dropbox.com/s/example/tokenizer_config.json?dl=1" && \
# wget -O /app/modelsBioembed/vocab.txt "https://www.dropbox.com/s/example/vocab.txt?dl=1" && \
# wget -O /app/modelsBioembed/special_tokens_map.json "https://www.dropbox.com/s/example/special_tokens_map.json?dl=1"
# # Copy the entire project to the container
# COPY . .
# # Expose the port for Flask
# EXPOSE 8000
# # Run the app with Gunicorn
# CMD ["gunicorn", "-b", "0.0.0.0:8000", "app:app"]
# # Use Python 3.8 as the base image
# FROM python:3.8
# # Install required system dependencies
# RUN apt-get update && apt-get install -y libopenblas-dev git curl && rm -rf /var/lib/apt/lists/*
# # Set the working directory inside the container
# WORKDIR /app
# # Copy the requirements file into the container
# COPY requirements.txt .
# # Install dependencies
# RUN pip install --no-cache-dir -r requirements.txt
# # Install gdown for Google Drive downloads
# RUN pip install --no-cache-dir gdown
# # Create necessary directories inside the container
# RUN mkdir -p /app/modelsBioembed /app/models_folder /app/Samples
# # Download model files from Google Drive using gdown
# RUN gdown --id 1aDirthtWAu-oyVjcWZ6linrddN-dmLMI -O /app/modelsBioembed/pytorch_model.bin && \
# gdown --id 1bwk1fSwqQE5mN9AhsOBlQkvFjHCGQtJ3 -O /app/modelsBioembed/config.json && \
# gdown --id 1ne-xJcySd8PcGTA4SdpTA6F869xsPiTf -O /app/modelsBioembed/tokenizer_config.json && \
# gdown --id 1tWjWsoeyPvTdW5sYZMSWpvISlN7tDoZ -O /app/modelsBioembed/vocab.txt && \
# gdown --id 1M8Qg9fSQ2A7CZpVFMCrZMIwam2j6Cc6P -O /app/modelsBioembed/special_tokens_map.json
# # Copy the entire project to the container
# COPY . .
# # Expose the port for Flask
# EXPOSE 8000
# # Run the app with Gunicorn
# CMD ["gunicorn", "-b", "0.0.0.0:8000", "app:app"]
# #Use Python 3.8 as the base image
# FROM python:3.8
# # Install required system dependencies
# RUN apt-get update && apt-get install -y libopenblas-dev git curl && rm -rf /var/lib/apt/lists/*
# # Set the working directory inside the container
# WORKDIR /app
# # Copy the requirements file into the container
# COPY requirements.txt .
# # Install dependencies
# RUN pip install --no-cache-dir -r requirements.txt
# # Install gdown for Google Drive downloads
# RUN pip install --no-cache-dir gdown
# # Create necessary directories inside the container
# RUN mkdir -p /app/modelsBioembed /app/models_folder /app/Samples
# # Download model files from Google Drive using alternative methods
# RUN curl -L -o /app/modelsBioembed/pytorch_model.bin "https://drive.google.com/uc?export=download&id=11g7bAXYNxlPsnwC8_qsUIZITAjG85JXb" && \
# curl -L -o /app/modelsBioembed/config.json "https://drive.google.com/uc?export=download&id=1ZfuhTnEuKAI1Z92m1QnDTOEQYNe9y24E" && \
# curl -L -o /app/modelsBioembed/tokenizer_config.json "https://drive.google.com/uc?export=download&id=1r4ncUsWBNQZVKp4zw97DLTf0AgRUiuFc" && \
# curl -L -o /app/modelsBioembed/vocab.txt "https://drive.google.com/uc?export=download&id=1G1UQIGMHvCC3OokCG1tl-cTxjIVqw04w" && \
# curl -L -o /app/modelsBioembed/special_tokens_map.json "https://drive.google.com/uc?export=download&id=1pINnV2P1eBmaC7X0A52UhjrmlJgzxqbl"
# # Copy the entire project to the container
# COPY . .
# # Expose the port for Flask
# EXPOSE 8000
# # Run the app with Gunicorn
# CMD ["gunicorn", "-b", "0.0.0.0:8000", "app:app"]
# # Use Python 3.8 as the base image
# FROM python:3.8
# # Install required system dependencies
# RUN apt-get update && apt-get install -y libopenblas-dev git curl wget && rm -rf /var/lib/apt/lists/*
# # Set the working directory inside the container
# WORKDIR /app
# # Copy the requirements file into the container
# COPY requirements.txt .
# # Install dependencies
# RUN pip install --no-cache-dir -r requirements.txt
# # Create necessary directories inside the container
# RUN mkdir -p /app/modelsBioembed /app/models_folder /app/Samples
# # Function to download file from Google Drive using wget
# RUN wget --no-check-certificate 'https://drive.google.com/uc?export=download&id=11g7bAXYNxlPsnwC8_qsUIZITAjG85JXb' -O /app/modelsBioembed/pytorch_model.bin && \
# wget --no-check-certificate 'https://drive.google.com/uc?export=download&id=1ZfuhTnEuKAI1Z92m1QnDTOEQYNe9y24E' -O /app/modelsBioembed/config.json && \
# wget --no-check-certificate 'https://drive.google.com/uc?export=download&id=1r4ncUsWBNQZVKp4zw97DLTf0AgRUiuFc' -O /app/modelsBioembed/tokenizer_config.json && \
# wget --no-check-certificate 'https://drive.google.com/uc?export=download&id=1G1UQIGMHvCC3OokCG1tl-cTxjIVqw04w' -O /app/modelsBioembed/vocab.txt && \
# wget --no-check-certificate 'https://drive.google.com/uc?export=download&id=1pINnV2P1eBmaC7X0A52UhjrmlJgzxqbl' -O /app/modelsBioembed/special_tokens_map.json
# # Copy the entire project to the container
# COPY . .
# # Expose the port for Flask
# EXPOSE 8000
# # Run the app with Gunicorn
# CMD ["gunicorn", "-b", "0.0.0.0:8000", "app:app"]
# # Use Python 3.8 as the base image
# FROM python:3.8
# # Install required system dependencies
# RUN apt-get update && apt-get install -y libopenblas-dev git curl && rm -rf /var/lib/apt/lists/*
# # Set the working directory inside the container
# WORKDIR /app
# # Copy the requirements file into the container
# COPY requirements.txt .
# # Install dependencies
# RUN pip install --no-cache-dir -r requirements.txt
# # Install gdown for Google Drive downloads
# RUN pip install --no-cache-dir gdown
# # Create necessary directories inside the container
# RUN mkdir -p /app/modelsBioembed /app/models_folder /app/Samples
# # Download model files using gdown with file IDs
# RUN gdown --id 1aDirthtWAu-oyVjcWZ6linrddN-dmLMI -O /app/modelsBioembed/pytorch_model.bin && \
# gdown --id 1bwk1fSwqQE5mN9AhsOBlQkvFjHCGQtJ3 -O /app/modelsBioembed/config.json && \
# gdown --id 1ne-xJcySd8PcGTA4SdpTA6F869xsPiTf -O /app/modelsBioembed/tokenizer_config.json && \
# gdown --id 1tWjWsoeyPvTdW5sYZMSWpvISlN7tDoZ -O /app/modelsBioembed/vocab.txt && \
# gdown --id 1M8Qg9fSQ2A7CZpVFMCrZMIwam2j6Cc6P -O /app/modelsBioembed/special_tokens_map.json
# # Copy the entire project to the container
# COPY . .
# # Expose the port for Flask
# EXPOSE 8000
# # Run the app with Gunicorn
# CMD ["gunicorn", "-b", "0.0.0.0:8000", "app:app"]
# # Use Python 3.8 as the base image
# FROM python:3.8
# # Install required system dependencies
# RUN apt-get update && apt-get install -y libopenblas-dev git curl && rm -rf /var/lib/apt/lists/*
# # Set the working directory inside the container
# WORKDIR /app
# # Copy the requirements file into the container
# COPY requirements.txt .
# # Install dependencies
# RUN pip install --no-cache-dir -r requirements.txt
# # Create necessary directories inside the container
# RUN mkdir -p /app/modelsBioembed /app/models_folder /app/Samples
# # Set the OAuth 2.0 Access Token (Replace with your actual token)
# ENV ACCESS_TOKEN="ya29.a0AeXRPp6PRilVeuzghPDbZQE7DxYHHWv4TARoaumWuo4gX9bIcEtMzp3PGi1Ak36YIbvKk32V7Cwb6bEjGfJuOWp0ZDW5rdog1c5uf9PJH7b-zgPxIeGa0kmZhGlk79gc7WfoSAl-GUopljJfOmKsyVn628CGB10RRHBtMQiHaCgYKARQSARESFQHGX2MiRd-59J4_XHWekXXqwK-jsw0175"
# # Define Google Drive File IDs
# ENV FILE_ID1="1aDirthtWAu-oyVjcWZ6linrddN-dmLMI"
# ENV FILE_ID2="1bwk1fSwqQE5mN9AhsOBlQkvFjHCGQtJ3"
# ENV FILE_ID3="1ne-xJcySd8PcGTA4SdpTA6F869xsPiTf"
# ENV FILE_ID4="1tWjWsoeyPvTdW5sYZMSWpvISlN7tDoZ"
# ENV FILE_ID5="1M8Qg9fSQ2A7CZpVFMCrZMIwam2j6Cc6P"
# # Download model files using curl with OAuth token
# RUN curl -H "Authorization: Bearer $ACCESS_TOKEN" "https://www.googleapis.com/drive/v3/files/$FILE_ID1?alt=media" -o /app/modelsBioembed/pytorch_model.bin && \
# curl -H "Authorization: Bearer $ACCESS_TOKEN" "https://www.googleapis.com/drive/v3/files/$FILE_ID2?alt=media" -o /app/modelsBioembed/config.json && \
# curl -H "Authorization: Bearer $ACCESS_TOKEN" "https://www.googleapis.com/drive/v3/files/$FILE_ID3?alt=media" -o /app/modelsBioembed/tokenizer_config.json && \
# curl -H "Authorization: Bearer $ACCESS_TOKEN" "https://www.googleapis.com/drive/v3/files/$FILE_ID4?alt=media" -o /app/modelsBioembed/vocab.txt && \
# curl -H "Authorization: Bearer $ACCESS_TOKEN" "https://www.googleapis.com/drive/v3/files/$FILE_ID5?alt=media" -o /app/modelsBioembed/special_tokens_map.json
# # Copy the entire project to the container
# COPY . .
# # Expose the port for Flask
# EXPOSE 8000
# # Run the app with Gunicorn
# CMD ["gunicorn", "-b", "0.0.0.0:8000", "app:app"]
|