Spaces:
Sleeping
Sleeping
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"] | |