Strange Spaces Behavior

Some shenanigans when using docker to build a space. The Dockerfile is trying to download .vscode for some reason?

Error Msg:

--> RUN useradd -m -u 1000 user
DONE 0.2s

--> WORKDIR /home/user/app
DONE 0.0s

--> COPY --chown=user . /home/user/app
DONE 0.0s

--> RUN wget https://github.com/gitpod-io/openvscode-server/releases/download/openvscode-server-v1.86.2/openvscode-server-v1.86.2-linux-x64.tar.gz -O /tmp/openvscode-server.tar.gz &&     tar -xzf /tmp/openvscode-server.tar.gz -C /opt &&     rm /tmp/openvscode-server.tar.gz &&     mv /opt/openvscode-server-v1.86.2-linux-x64 /opt/openvscode-server &&     chown -R 1000:1000 /opt/openvscode-server
/bin/sh: 1: wget: not found

--> ERROR: process "/bin/sh -c wget https://github.com/gitpod-io/openvscode-server/releases/download/openvscode-server-v1.86.2/openvscode-server-v1.86.2-linux-x64.tar.gz -O /tmp/openvscode-server.tar.gz &&     tar -xzf /tmp/openvscode-server.tar.gz -C /opt &&     rm /tmp/openvscode-server.tar.gz &&     mv /opt/openvscode-server-v1.86.2-linux-x64 /opt/openvscode-server &&     chown -R 1000:1000 /opt/openvscode-server" did not complete successfully: exit code: 127

requirments.txt:

Pillow
requests
uvicorn
fastapi

Dockerfile:

# Use the official lightweight Python image.
FROM python:3.10-slim

# Copy local code to the container image.
WORKDIR /app
COPY . ./

# Install production dependencies.
RUN pip install --no-cache-dir --upgrade -r requirements.txt

# Set up a new user named "user" with user ID 1000
RUN useradd -m -u 1000 user

# Switch to the "user" user
USER user

# Set home to the user's home directory
ENV HOME=/home/user \
	PATH=/home/user/.local/bin:$PATH 

# Set the working directory to the user's home directory
WORKDIR $HOME/app

# Copy the current directory contents into the container at $HOME/app setting the owner to the user
COPY --chown=user . $HOME/app

CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] 

Any ideas on why this error may be occurring? There was no .vscode file in the repository. I have deleted that space and re uploaded but am running into some crazy CORS errors that make no sense at all. Here’s the space. Pixel Prompt. There is an alternate space on my profile running with the same architecture, Docker => FastAPI to Static React that has no issues.

I blame lack of sleep…

'/api'

Not

'http://localhost:7860/api'

still curious about vscode strangeness

1 Like

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.