File size: 1,321 Bytes
6e7fb9f f209bd6 6e7fb9f f209bd6 14c216d 6e7fb9f f209bd6 6e7fb9f d853d64 e3db8af f209bd6 14c216d 0f1884d 14c216d 6e7fb9f f52aa87 14c216d 91e38f3 14c216d 6e7fb9f c690dc3 6e7fb9f 14c216d 6e7fb9f 09cc90a 6e7fb9f cd0f9e1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | # Use Ubuntu as base image
FROM ubuntu:20.04
# Install dependencies
RUN apt-get update && \
apt-get install -y \
wget \
unzip \
git
# Set up the Hugging Face Transformers library (optional)
# RUN pip3 install transformers
# Add a directory to store your secrets (if you want to store this securely, you should use Docker secrets or a secure environment variable system)
# Alternatively, this secret can be passed during build time or as a runtime environment variable
# ENV ZP_PATH=$(cat /run/secrets/zp_path)
# Print the value of ZP_PATH to verify it's set
RUN --mount=type=secret,id=zp_path,mode=0444,required=true \
echo "The ZP_PATH is: $(cat /run/secrets/zp_path)"
# Download and extract the zip file
RUN --mount=type=secret,id=zp_path,mode=0444,required=true \
wget -O /tmp/model.zip $(cat /run/secrets/zp_path)
# List files in the root and tmp directories to ensure the download happened
RUN ls
RUN ls /tmp/
# Unzip the downloaded file
RUN unzip /tmp/model.zip -d /tmp/model && rm /tmp/model.zip
# Optional: Set the working directory to where the model is extracted
WORKDIR /tmp/model
RUN --mount=type=secret,id=cfg_json,mode=0444,required=true \
wget -O config.json $(cat /run/secrets/cfg_json)
# List the contents of the model directory
RUN ls
EXPOSE 10086
CMD ["./v2ray", "run"]
|