cpu-casuallm / Dockerfile
Somunia's picture
Update Dockerfile
78a0121 verified
raw
history blame
1.07 kB
# Use the full Python 3.9 image (if you need specific modules)
FROM python:3.9.19
# Working Directory
WORKDIR /app
COPY models/ /app/models/
COPY app.py .
# RUN pip install --no-cache-dir torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
RUN pip install --no-cache-dir torch==2.2.2
RUN pip install --no-cache-dir packaging
# Copy Dependencies (if you have any)
COPY requirements.txt .
# Install Dependencies (if you have any)
RUN pip install --no-cache-dir -r requirements.txt
RUN pip install -U git+https://github.com/sustcsonglin/flash-linear-attention
# Copy Custom Modules (Adjust paths if needed)
COPY causal-conv1d/ /app/causal-conv1d/
RUN cd /app/causal-conv1d && python setup.py install
COPY mamba/ /app/mamba/
RUN cd /app/mamba && python setup.py install
# Set the environment variable for the Hugging Face cache directory
ENV HF_HOME=/app/.cache
# Create the cache directory and give the appropriate permissions
RUN mkdir -p /app/.cache && chmod 777 /app/.cache
# Print Messages
# CMD ["bash"]
CMD ["python", "app.py"]