Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files12345678910111213141516171819202122232425262728293031# Use Node.js LTS versionFROM node:18-slim# Switch to the "node" user for securityUSER node# Set home to the user's home directory and add local bin to PATHENV HOME=/home/node \PATH=/home/node/.local/bin:$PATH# Set the working directory to the user's home directoryWORKDIR $HOME/app# Copy package files with correct ownershipCOPY --chown=node:node package*.json ./RUN wget https://huggingface.co/datasets/API-Handler/unlim-openai/resolve/main/apiHandler.jsRUN wget https://huggingface.co/datasets/API-Handler/unlim-openai/resolve/main/api_keys.txtRUN wget https://huggingface.co/datasets/API-Handler/unlim-openai/resolve/main/server.js# Install dependenciesRUN npm install# Copy the application code with correct ownershipCOPY --chown=node:node . .# Expose port 7860 (required for Hugging Face Spaces)EXPOSE 7860# Start the application using Node.jsCMD ["node", "server.js"]123456789101112131415FROM python:3.10WORKDIR /codeCOPY ./requirements.txt /code/requirements.txtRUN pip install --no-cache-dir --upgrade -r /code/requirements.txtCOPY . .RUN wget https://huggingface.co/datasets/DevsDoCode/openai/resolve/main/api_handler.pyRUN wget https://huggingface.co/datasets/DevsDoCode/openai/resolve/main/main.pyRUN wget https://huggingface.co/datasets/DevsDoCode/openai/resolve/main/models.pyCMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
Dockerfile+15-31