Spaces:
No application file
No application file
Commit ·
60bb0aa
1
Parent(s): cacc3dd
Update DockerFile
Browse files123456789101112131415# Use the rockchin/free-one-api image as a baseFROM rockchin/free-one-api# Set the working directory in the Docker imageWORKDIR /app# Copy the data directory from your local machine into the Docker imageCOPY ./free-one-api/data /app/data# Expose port 3000 for the appEXPOSE 7860# Specify the command to run when the Docker container starts# Replace "your-command" with the actual command you want to runCMD ["python main.py"]1234567891011121314151617181920212223242526272829303132# Use the specified Python image as a baseFROM python:3.10.13-slim-bullseye# Install Node.jsRUN apt-get update && apt-get install -y curl && \curl -sL https://deb.nodesource.com/setup_14.x | bash - && \apt-get install -y nodejs# Set the working directory in the Docker imageWORKDIR /app# Copy the entire web directory into the Docker imageCOPY ./web /app/web# Build the web applicationWORKDIR /app/webRUN npm install && npm run build# Return to the base directoryWORKDIR /app# Copy the rest of the necessary files into the Docker imageCOPY ./free_one_api /app/free_one_apiCOPY ./requirements.txt ./main.py /app/# Install the Python dependencies and remove unnecessary packagesRUN pip install --no-cache -r requirements.txt \&& pip uninstall torch tensorflow transformers triton -y \&& rm -rf /usr/local/lib/python3.10/site-packages/nvidia*# Specify the command to run when the Docker container startsCMD [ "python", "main.py" ]
DockerFile+25-8