Initial Commit
This commit is contained in:
commit
402c3b5cb6
27 changed files with 911 additions and 0 deletions
50
Dockerfile
Normal file
50
Dockerfile
Normal file
|
@ -0,0 +1,50 @@
|
|||
# Dockerfile
|
||||
# Use an existing docker image as a base
|
||||
FROM repo.n64.cc:443/nosial/ncc:debian as builder
|
||||
|
||||
# Metadata
|
||||
LABEL maintainer="Netkas <netkas@nosial.net>"
|
||||
LABEL version="1.0"
|
||||
LABEL description="Keybert"
|
||||
|
||||
# Set working directory in the container
|
||||
WORKDIR /keybert
|
||||
|
||||
# Increase PHP memory limit
|
||||
RUN echo "memory_limit=-1" > /usr/local/etc/php/conf.d/memory-limit.ini
|
||||
|
||||
# Copy local code to the container
|
||||
COPY . ./
|
||||
|
||||
# Install build dependencies for numpy and scipy
|
||||
RUN apt-get update && apt-get install -y \
|
||||
zip \
|
||||
unzip \
|
||||
build-essential \
|
||||
gfortran \
|
||||
python3 \
|
||||
python3-pip \
|
||||
python3-dev \
|
||||
python3-venv
|
||||
|
||||
# Create a Python virtual environment
|
||||
RUN python3 -m venv /opt/venv
|
||||
# Make sure we use the virtualenv:
|
||||
ENV PATH="/opt/venv/bin:$PATH"
|
||||
|
||||
# Install aiohttp and Keybert
|
||||
RUN pip install --upgrade pip \
|
||||
&& pip install aiohttp keybert
|
||||
|
||||
# Build and install Keybert
|
||||
RUN ncc build --build-configuration release --log-level debug \
|
||||
&& ncc package install -p "build/release/net.nosial.keybert.ncc" --log-level debug -y
|
||||
|
||||
# Clean up unnecessary files
|
||||
RUN rm -rf /keybert
|
||||
|
||||
# Set working directory in the container
|
||||
WORKDIR /
|
||||
|
||||
# Execute focuscrawler
|
||||
CMD ["ncc", "exec", "--package", "net.nosial.keybert", "--exec-unit", "main", "--exec-args", "run"]
|
Loading…
Add table
Add a link
Reference in a new issue