Miner / Dockerfile
Imaginethat's picture
Update Dockerfile
4cd9cbf verified
raw
history blame contribute delete
938 Bytes
FROM nvidia/cuda:12.4.1-cudnn-runtime-ubuntu22.04
# 1. Install Python, git, AND 'dos2unix' (the magic fixer tool)
RUN apt-get update && apt-get install -y \
python3.10 \
python3-pip \
git \
git-lfs \
dos2unix \
&& rm -rf /var/lib/apt/lists/*
# 2. Set up Python alias
RUN ln -s /usr/bin/python3.10 /usr/bin/python
WORKDIR /app
# 3. Install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
# 4. Copy all your scripts and configs
COPY sys7_miner.py .
COPY system7_lexicons.json .
COPY label_orders.json .
COPY slang_lexicon.json .
COPY run_job.py .
# 5. THE FIX: Convert all scripts to Unix line endings
# This fixes 'run_job.py' and any other text file that might have Windows formatting
RUN dos2unix run_job.py sys7_miner.py
# 6. Permissions
RUN chmod +x run_job.py
# 7. Run the job
CMD ["python", "run_job.py"]