EdgeAIG commited on
Commit
aa0f053
·
verified ·
1 Parent(s): 2cb0b8a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +14 -14
Dockerfile CHANGED
@@ -1,21 +1,21 @@
1
- FROM node:20
2
 
3
- RUN apt-get update && apt-get install -y curl git dos2unix && rm -rf /var/lib/apt/lists/*
 
 
 
 
4
 
5
- WORKDIR /home/node/app
6
- RUN chown -R node:node /home/node/app
7
 
8
- USER node
 
 
9
 
10
- ENV NPM_CONFIG_PREFIX=/home/node/.npm-global
11
- ENV PATH=/home/node/.npm-global/bin:$PATH
12
-
13
- RUN npm install -g opencode-ai
14
-
15
- COPY --chown=node:node . .
16
-
17
- RUN dos2unix start.sh && chmod +x start.sh
18
 
 
19
  EXPOSE 7860
20
 
21
- CMD ["/bin/bash", "./start.sh"]
 
1
+ FROM python:3.10-slim
2
 
3
+ # Create a non-root user named 'user'
4
+ RUN useradd -m -u 1000 user
5
+ USER user
6
+ ENV HOME=/home/user \
7
+ PATH=/home/user/.local/bin:$PATH
8
 
9
+ WORKDIR /app
 
10
 
11
+ # Install dependencies
12
+ COPY --chown=user:user requirements.txt /app/requirements.txt
13
+ RUN pip install --no-cache-dir --upgrade -r /app/requirements.txt
14
 
15
+ # Copy application files
16
+ COPY --chown=user:user . /app
 
 
 
 
 
 
17
 
18
+ # Expose port 7860 required by Hugging Face
19
  EXPOSE 7860
20
 
21
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]