| |
| |
|
|
| FROM python:3.12 |
|
|
| |
| RUN apt-get update && apt-get install -y \ |
| build-essential gcc g++ cmake make gnupg \ |
| pybind11-dev libpython3-dev python3-dev \ |
| default-jdk \ |
| net-tools \ |
| nginx \ |
| supervisor \ |
| curl wget git \ |
| libgomp1 \ |
| libwebsockets-dev \ |
| libjson-c-dev \ |
| libssl-dev \ |
| libuv1-dev \ |
| && rm -rf /var/lib/apt/lists/* |
|
|
| |
| RUN cd /tmp && \ |
| git clone https://github.com/tsl0922/ttyd.git && \ |
| cd ttyd && \ |
| mkdir build && cd build && \ |
| cmake .. && \ |
| make && \ |
| make install && \ |
| cd / && \ |
| rm -rf /tmp/ttyd |
|
|
| |
| |
| |
| |
| RUN pip install --upgrade pip -i https://mirrors.aliyun.com/pypi/simple && \ |
| pip install uv -i https://mirrors.aliyun.com/pypi/simple && \ |
| uv pip install --system -U "mineru[all]" -i https://mirrors.aliyun.com/pypi/simple |
| |
| |
| |
| |
| |
|
|
| |
| RUN ttyd --version |
|
|
| |
| RUN curl -fsSL https://deb.nodesource.com/setup_24.x | bash - \ |
| && apt-get install -y nodejs \ |
| && npm install -g npm@latest |
|
|
| RUN useradd -m -u 1000 user |
| RUN chown -R user:user /var/lib/nginx/ \ |
| && chmod -R 755 /var/lib/nginx \ |
| && chown -R user:user /var/log/ \ |
| && chmod -R 755 /var/log \ |
| && chown -R user:user /run/ \ |
| && chmod -R 755 /run |
| USER user |
|
|
| WORKDIR /app |
|
|
| |
| |
|
|
| COPY --chown=user ./requirements.txt requirements.txt |
| RUN pip install --no-cache-dir --upgrade -r requirements.txt |
|
|
| COPY --chown=user . /app |
|
|
| |
| |
| |
| |
|
|
| |
| |
| |
|
|
| |
| RUN cd app_cpppy && \ |
| mkdir -p build && \ |
| cd build && \ |
| cmake .. -DCMAKE_BUILD_TYPE=Release && \ |
| make -j$(nproc) |
|
|
| |
| RUN cp ./app_cpppy/build/*.so ./bin/ 2>/dev/null || true |
| |
| |
| |
|
|
| |
| ENV PATH="/home/user/.local/bin:/app/bin:$PATH" |
| ENV PYTHONPATH=/usr/local/lib/python3.12/site-packages:/app/bin:$PYTHONPATH |
|
|
| |
| RUN chmod +x /app/scripts/ |
| RUN chmod +x /app/bin/ |
|
|
| |
| EXPOSE 7860 |
| |
| |
| |
|
|
| |
| |
| |
| |
| |
| |
| |
| |
|
|
| |
| CMD ["/usr/bin/supervisord", "-n", "-c", "/app/supervisor/supervisor.conf"] |
|
|