omnitool_on_hf / Dockerfile
manu-sapiens's picture
copy of omnitool_latest - should be working
b39afbe
raw
history blame
1.45 kB
FROM node:20.6.1
USER node
WORKDIR /app
RUN mkdir -p /app/node_modules
RUN chmod 777 /app
RUN chmod 777 /app/node_modules
COPY --chown=node package*.json /app
COPY --chown=node yarn.lock /app
COPY --chown=node . /app
# Get curl
#RUN apt-get update && apt-get install -y curl
# Download the file to a temporary location
RUN curl -L https://github.com/omnitool-ai/omnitool/raw/main/packages/omni-server/config.default/models/nsfwjs/mobilenet-v2-quant/group1-shard1of1 -o _tempfile.bin
# Create the target directory
RUN mkdir -p /app/packages/omni-server/config.default/models/nsfwjs/mobilenet-v2-quant/
RUN chmod 777 /app/packages/omni-server/config.default/models/nsfwjs/mobilenet-v2-quant/
# Move the file to the desired directory
RUN mv _tempfile.bin /app/packages/omni-server/config.default/models/nsfwjs/mobilenet-v2-quant/group1-shard1of1 && chown -R node /app/packages/omni-server/config.default/models/nsfwjs/mobilenet-v2-quant/group1-shard1of1
RUN chmod 777 /app/packages/omni-server/config.default/models/nsfwjs/mobilenet-v2-quant/group1-shard1of1
RUN chown -Rh $user:$user /app
# Copy application source code along with main.py and run.sh
COPY --chown=node . /app
# Give execution rights to the shell script
# RUN chmod +x $HOME/app/start.sh
RUN yarn install
# Create a new service container using the `yarn-app` image as a builder
EXPOSE 7860
CMD [ "node", "launch.js" ]
#CMD [ "yarn", "start","-u","-rb" ]
# CMD ["/app/run.sh"]